-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Meh…" #79
Revert "Meh…" #79
Conversation
This reverts commit 2590f76.
The reason that I did that commit was because (on macOS, at least, but apparently not Linux) the "after all" hooks were timing out (the If you would like to dig deeper into why macOS is timing out that would be appreciated. |
Hmm I'm on macOS (10.14.6) and I see no issues. I'll add it to Travis. |
27822f3
to
7af8613
Compare
7af8613
to
8376af5
Compare
There are some failing tests on macOS but no timeouts. It seems something is written to the socket after it is destroyed by the other peer. |
The tests failing seems to be intermittent. And indeed it's working properly for me now on macOS. Not sure what the issue for me was last night. |
I think the failing tests are due to an |
I investigated a little and it seems tests flakiness on macOS is caused by the premature removal of the Interestingly the error is only emitted when using an HTTPS proxy and the target is an HTTPS endpoint but I did not figure out why. |
Sockets are not reused so the listeners should be GC'ed when the sockets are closed. Furthermore there are cases where the `'error'` listeners are prematurely removed leading to unhandled errors and unexpected crashes. Refs: TooTallNate/proxy-agents#79
I've opened TooTallNate/proxy#16. |
* Do not remove the event listeners of the sockets Sockets are not reused so the listeners should be GC'ed when the sockets are closed. Furthermore there are cases where the `'error'` listeners are prematurely removed leading to unhandled errors and unexpected crashes. Refs: TooTallNate/proxy-agents#79 * Partially revert 58ed8f0 Resuming the client socket is no longer needed as it is destroyed when the target socket emits `'close'`.
This reverts commit 2590f76 as per 2590f76#commitcomment-35365193