LibSub does not notify its user when server shuts down a connection
Description
When the server is shut down or the TCP connexion is explicitly lost, the disconnection callback is not called, and the client side connection remains pending.
Analysis
When the server is shut down, the client session becomes orphaned.
All pending requests are marked as failed, and corresponding SE_SND_REQUEST_FAILED
are sent to the LibSub.
Afterwards, a SE_SESSION_REACTIVATING
event is sent.
When closing the connection of an orphaned session, the operation io_dispatch_mgr__client_send_close_session_request
fails (as the connection is closed, no request is sent), but the session remains orphaned indefinitely, and no notification is sent.
A call to local_client_close_session
should be added to the operation session_mgr__client_close_session_req
.
With this modification, the event SE_SESSION_ACTIVATION_FAILURE
is sent to the LibSub's event handler, which is now able to notify its user of the disconnection.