Sending the CloseMessage also has the effect of closing the socket according to its description.
I noticed that before patching this in the package, the socket would be closed when I called destroy on the provider even if it was supposed to preserve the connection. When using multiple providers on the same socket at once, it's important that no provider getting destroyed closes the whole socket. disconnecting the provider is not enough because it still has listeners on the document, socket, and elsewhere which is not acceptable.
Sending the
CloseMessage
also has the effect of closing the socket according to its description.I noticed that before patching this in the package, the socket would be closed when I called
destroy
on the provider even if it was supposed to preserve the connection. When using multiple providers on the same socket at once, it's important that no provider getting destroyed closes the whole socket.disconnect
ing the provider is not enough because it still has listeners on the document, socket, and elsewhere which is not acceptable.