If a WebSocket client disconnects without initiating the close handshake, an exception is thrown since the socket will be in an invalid state, so CloseOutputAsync() shouldn't be called, since there won't be anything to receive this message.
Also, CloseAsync() expects a full close handshake, whereas a CloseOutputAsync() will simply initiate the close and not wait for any response from a client, so in this case CloseOutputAsync is the one to use.
The API has changed slightly for the ConnectionManager, since the socket must still be removed on a client disconnection that did not involve the close handshake.
If a WebSocket client disconnects without initiating the close handshake, an exception is thrown since the socket will be in an invalid state, so
CloseOutputAsync()
shouldn't be called, since there won't be anything to receive this message.Also,
CloseAsync()
expects a full close handshake, whereas aCloseOutputAsync()
will simply initiate the close and not wait for any response from a client, so in this caseCloseOutputAsync
is the one to use.The API has changed slightly for the
ConnectionManager
, since the socket must still be removed on a client disconnection that did not involve the close handshake.