-
Notifications
You must be signed in to change notification settings - Fork 502
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
fix: add connect timeout #619
Conversation
Codecov Report
@@ Coverage Diff @@
## main #619 +/- ##
==========================================
+ Coverage 98.03% 98.63% +0.60%
==========================================
Files 17 17
Lines 1574 1463 -111
==========================================
- Hits 1543 1443 -100
+ Misses 31 20 -11
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really prefer if this had a test.
Does it worsen our benchmarks?
Should this have a default as it can happen in reality? |
Co-authored-by: Matteo Collina <hello@matteocollina.com>
It has a default. 10s. |
Any idea on how to reproduce this scenario? When I try I always get an error. Maybe if I monkeypatch the global socket prototype :/? |
No. |
Nvm, I don't see anything public we can use server-side to delay the |
Go for it in its own test file. |
Added test |
* fix: add connect timeout * fixuP * fixup * fixup * fixuP * Update lib/core/errors.js Co-authored-by: Matteo Collina <hello@matteocollina.com> * fixup: add test Co-authored-by: Matteo Collina <hello@matteocollina.com>
Haven't been able to build a test case for this but in production I have case where neither
'connect'
not'error'
is invoked on a socket aftersocket.connect()
.