You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not exactly straight-forward to reuse an existing Socket between connects. It does tend to work mostly, but I just spent some time trying to figure out why pipes failed to reattach (as an error on a ReadableStream causes it to drop all of its pipe partners) between reconnect attempts. Finally tracked it down to socket._readableState.endEmitted being true in the window between a close (e.g. one for a failed connect attempt) and calling Socket.prototype.connect, something which EverSocket does with a timeout.
You might want to either document these idiosyncrasies or figure out a way to reset the socket after a failed connect attempt, so it'll behave similarly to a socket that has never been connected.
The text was updated successfully, but these errors were encountered:
Hey,
It's not exactly straight-forward to reuse an existing Socket between connects. It does tend to work mostly, but I just spent some time trying to figure out why pipes failed to reattach (as an
error
on aReadableStream
causes it to drop all of its pipe partners) between reconnect attempts. Finally tracked it down tosocket._readableState.endEmitted
beingtrue
in the window between aclose
(e.g. one for a failed connect attempt) and callingSocket.prototype.connect
, something which EverSocket does with a timeout.You might want to either document these idiosyncrasies or figure out a way to reset the socket after a failed connect attempt, so it'll behave similarly to a socket that has never been connected.
The text was updated successfully, but these errors were encountered: