-
Notifications
You must be signed in to change notification settings - Fork 308
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
Add configuration for websocket timeout #1176
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.x #1176 +/- ##
===========================================
- Coverage 66.70% 49.48% -17.22%
===========================================
Files 61 61
Lines 4980 4987 +7
Branches 1109 1111 +2
===========================================
- Hits 3322 2468 -854
- Misses 1658 2519 +861
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.
This is looking good! A couple of the files ended up with Windows line endings -- could you convert those back to \n
? (They make the diff huge.) Also, could you add the new socketTimeout option to the schema in src/schemas/config.json
?
src/lib/channels/WebSocket.ts
Outdated
if (this.timeout == null) { | ||
this.timeout = 10000; | ||
} | ||
this.timeout = options.timeout || 10000; |
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.
Prefer ??
over ||
.
Thanks for fixing the schema and line endings. Is there a need to use |
When I use |
Hmm...what version of TS are you building with ( |
Looks like I'm on "Version 3.5.2" (after doing a fresh The error is:
|
Hmmm...yeah, the TS version is set by intern-dev. Let's restore the original logic, then. While |
There are cases where it is useful/necessary to set the timeout on acknowledgments from the server when data is sent over the WebSocket.
This PR makes it possible to configure this value.