close

open override fun close()

Ends the session, undoing the per-session state it left on its connection and giving that connection up - back to the pool it was borrowed from, or closed outright.

The session is finished at that point and holds no claim on the connection, which a pool may already have handed to somebody else. Anything asked of it from here raises NetworkException rather than reaching a connection that is no longer this session's; closing twice does nothing the second time.