Closed RDLemos closed 7 years ago
reconnect was causing trouble, have you checked it?
What kind of trouble? I have checked on our server, and was working fine. Before the change, once we lost the WS connection, we would need to restart the server. After the change, when the WS is lost, the XMPP client will try to reconnect after the time-out set (10s).
These are the result of my testing using the reconnect option: 1) Using reconnect option, once we get a WS error detected on the connection (Network down), the xmpp client tries to re-establish the stream: 23:49:30.681Z ERROR appIMPServer: [FCM]: Socket error [Dev Server]: { [Error: read ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'read' }
xmpp:connection use lazy socket +3s xmpp:connection setup stream +1ms xmpp:connection use lazy socket +631ms xmpp:connection setup stream +1ms xmpp:connection use lazy socket +1s xmpp:connection setup stream +1ms xmpp:connection use lazy socket +2s xmpp:connection setup stream +1ms xmpp:connection use lazy socket +1s xmpp:connection setup stream +1ms xmpp:connection use lazy socket +2s xmpp:connection setup stream +0ms
2) Once I reestablish the server connection ( network Up), the CMPP-Client reconnects the WS, and reconnect the stream:
xmpp:connection use lazy socket +24s
xmpp:connection setup stream +1ms
xmpp:connection send:
@guness : What problem did you have with reconnect?
I am waiting for this update to be able to allow some of our server users to start using our push notifications service.
@guness : Do you think you will be able to update the npm to version 1.6 with this change today or tomorrow?
published
Allow the XMPP Client to try to reconnect to the Server, if the WebSocket connection gets disconnected. The client will try to reconnect according to the default