Disconnecting from sessions
To disconnect from a session, execute one of the following actions:
SessionHandler.disconnect() disconnects the session handler from the session it is connected to. There is no notification of success. It is an error to try to disconnect before a successful connection.
SessionHandler.disconnectCb() disconnects the session handler from the session it is connected to and invokes the specified callback upon successful disconnection. It is an error to try to disconnect before a successful connection.
Disconnecting from a session that is no longer needed (such as on system shutdown) is typically not required but is considered good practice.