-
Notifications
You must be signed in to change notification settings - Fork 193
Description
Hello,
I have a decent understanding of this library. However, I cannot resolve a random disconnection issue that keeps happening. Every few minutes or sometimes hours, the client gets disconnected from the SMPP server and gives only the following error in the logs
2024-03-22T11:30:38: Error: read ECONNRESET
2024-03-22T11:30:38: at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
2024-03-22T11:30:38: errno: -104,
2024-03-22T11:30:38: code: 'ECONNRESET',
2024-03-22T11:30:38: syscall: 'read'
2024-03-22T11:30:38: }
I have tried inspecting this but there is no error I can pinpoint that cause this. TCP dump taken reveals that the server sends [FIN, ACK] packet that causes disconnection. My best guess is that the client does not send "enquire_link" quickly enough and this causes disconnection. The client cannot change the enquire_link_interval period which is 60 seconds. Is there a way to increase the window we wait for enquire_link PDU before we disconnect? Is my understanding flawed here?
Also, I tried handling this by using session.on("error", (){}) but it doesn't work. I cannot even catch and log this error.
I would appreciate any help.
-Thanks in advance