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
Unhandled error due to ECONNRESET crashes my script. Already tried to catch the error with .on("error"), but the error is still unhandled and will crash my node script. The error and my connection setup are down below.
To Reproduce
No direct way to reproduce, this occurs a few minutes after I established the connection (even with commands being sent).
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
Emitted 'error' event on ProtocolRAW instance at:
at ProtocolRAW.handleError (C:\Users<redacted><myProject>\node_modules\ts3-nodejs-library\lib\transport\protocols\raw.js:41:14)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}
if it happens on first connect you probably do not have your error handler attached, you first need to listen to the error event and after that you should connect to the teamspeak server
so just move the
awaitts3.connect();logger.info("Successfully connected to TS3");
right before you return from the function because it waits until it has connected and after it successfully connected it will register the error event
It does not happen on the initial connect. It happens 5-10 minutes after the connection has been established. The connection initialization was successful, since I can run commands without any problem on the TS3 server. But after a while I get the error above.
Describe the bug
Unhandled error due to ECONNRESET crashes my script. Already tried to catch the error with .on("error"), but the error is still unhandled and will crash my node script. The error and my connection setup are down below.
To Reproduce
No direct way to reproduce, this occurs a few minutes after I established the connection (even with commands being sent).
Expected behavior
No unhandled exceptions.
Versions used
Additional context
node:events:496
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
Emitted 'error' event on ProtocolRAW instance at:
at ProtocolRAW.handleError (C:\Users<redacted><myProject>\node_modules\ts3-nodejs-library\lib\transport\protocols\raw.js:41:14)
at Socket.emit (node:events:518:28)
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}
Node.js v20.12.0
And here is my connection setup:
The text was updated successfully, but these errors were encountered: