-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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 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.
Metadata
Metadata
Assignees
Labels
No labels