Deploy an app with :nrepl-port configured, connect to it, then undeploy. The nrepl session remains active.
nrepl doesn't currently track sockets, so they can't be closed from the server side. The only way to close them is for the client to disconnect. We may be able to have nrepl add socket tracking, allowing us to close them from the server.
0.2.0-RC1 now tracks open transports, we just have to close the server properly to have it close them for us: https://github.com/immutant/immutant/commit/cb2f6b675291d25e9003704e6f121217222278fc