-1

I'm using node-smpp. App doesn't connect smpp server every time for sending sms, just connects one time and after 2-3 minutes app reconnects again. App works fine and sms sent. But sometimes in 2-3 days or 1-2 weeks occur an error 'ETIMEDOUT' and smpp server doesn't return response.

How to fix this.

Pooja Gupta
  • 785
  • 10
  • 22
Ezio
  • 1
  • 1

1 Answers1

0

You must use heartbeats, to let the connection stays alive. How much time the connection can be idle is defined in SMPP server and may vary. SMPP uses for that Enquire Link Request/Response, which you must send periodically. Other workaround would be, that in case of ETIMEDOUT you simply do reconnect.

Marvin
  • 598
  • 5
  • 14