In sctransport.js, consider emitting disconnect/connectAbort event after calling _abortAllPendingEventsDueToBadConnection
jondubois opened this issue · 1 comments
jondubois commented
Ideally disconnection should happen after events have been cancelled.
Right now this is not the case: https://github.com/SocketCluster/socketcluster-client/blob/master/lib/sctransport.js#L211
First, check that switching the order doesn't cause any negative side effects.
jondubois commented
This ordering of events on the transport object is necessary to allow the socket to handle the disconnect cleanup operations at a higher level before they are cleaned up at the lower (transport) lever.