You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using a TCP-based query protocol, such as the battlefield one, timeouts do not trigger as expected. Socket timeout seems to to not trigger at all, attempt timeout gets logged, but does not acually abort the connection attempt.
Expected behavior
Run two attempts against the given IP/port combination, which fail because the TCP connect times out after 1640 ms each. The total runtime should be roughly 2 x 1640 = 3280ms.
Screenshots or Data
Using 5.1.1, the entire command runs for over two minutes.
time gamedig --type battlefield4 62.104.17.57:47200 --socketTimeout 1640 --maxRetries 2 --givenPortOnly
{"error":"Failed all 2 attempts"}
gamedig --type battlefield4 62.104.17.57:47200 --socketTimeout 1640 2 0,56s user 0,11s system 0% cpu 2:19,83 total
The failed attempts get logged after ~20 seconds, which would 2x the default attempt timeout. But it then hangs for two minutes. Running it with --debug shows that the connection timeout only triggers right before the command exits (after >2 mintues).
Additional context
I had a quick look in the debugger, looks like the this.registerRtt call is causing the 2-minutes hang, as a breakpoint in the line below (which seemingly set's up the socket timeout) only fires after 2 minutes.
Running the equivalent command using 4.3.2 works as expected
time gamedig --type bf4 62.104.17.57:47200 --socketTimeout 1640 --maxAttempts 2 --givenPortOnly
{"error":"Failed all 2 attempts"}
gamedig --type bf4 62.104.17.57:47200 --socketTimeout 1640 --maxAttempts 2 0,14s user 0,07s system 5% cpu 3,455 total
The text was updated successfully, but these errors were encountered:
This weekend I was very busy because I was switching places and if I would have had taken a look at this earlier (as you made this issue roughly right after my PR), I could have made the fix faster, my bad.
Describe the bug
When using a TCP-based query protocol, such as the
battlefield
one, timeouts do not trigger as expected. Socket timeout seems to to not trigger at all, attempt timeout gets logged, but does not acually abort the connection attempt.Steps To Reproduce
Using gamedig 5.1.1, run
Expected behavior
Run two attempts against the given IP/port combination, which fail because the TCP connect times out after 1640 ms each. The total runtime should be roughly 2 x 1640 = 3280ms.
Screenshots or Data
Using 5.1.1, the entire command runs for over two minutes.
The failed attempts get logged after ~20 seconds, which would 2x the default attempt timeout. But it then hangs for two minutes. Running it with
--debug
shows that the connection timeout only triggers right before the command exits (after >2 mintues).Additional context
I had a quick look in the debugger, looks like the
this.registerRtt
call is causing the 2-minutes hang, as a breakpoint in the line below (which seemingly set's up the socket timeout) only fires after 2 minutes.node-gamedig/protocols/core.js
Lines 197 to 208 in bdb819d
Running the equivalent command using 4.3.2 works as expected
The text was updated successfully, but these errors were encountered: