close
Closes the session and releases all associated resources.
Performs the following steps in order:
Cancels the internal coroutine scope, stopping message processing.
Closes callsInbox, causing any active
forloop over it to terminate.Completes all pending request calls exceptionally with JsonRpcException.InternalError.
Calls JsonRpcTransportSession.close on the underlying transport. Any error thrown by the transport is swallowed and logged as a warning.
This function is idempotent: calling it more than once has no effect and does not throw.