WebSocket disconnect when idleTimeout is less than 6 seconds #286
-
Hey, I've found that websockets will be dropped when idleTimeout is less than 6 seconds. Method of testing: Sample code, using uWS v17.3.0
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
What if you specify 6.9999 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I cannot reproduce this issue. Your screenshot seems to show how it is supposed to act. Timeout is very granular and works in steps of 4 seconds. This means 5 seconds will round to 4 seconds which is anything between 0 to 4 seconds if I remember correctly. This while 6 will round to 8 seconds, which is anything between 4 to 8 seconds. This is controlled by LIBUS_TIMEOUT_GRANULARITY which is 4 seconds by default. |
Beta Was this translation helpful? Give feedback.
-
Interesting, I didn't know about |
Beta Was this translation helpful? Give feedback.
I cannot reproduce this issue. Your screenshot seems to show how it is supposed to act. Timeout is very granular and works in steps of 4 seconds. This means 5 seconds will round to 4 seconds which is anything between 0 to 4 seconds if I remember correctly. This while 6 will round to 8 seconds, which is anything between 4 to 8 seconds.
This is controlled by LIBUS_TIMEOUT_GRANULARITY which is 4 seconds by default.