When the network goes down and comes, the primus reconnect happens. But it is getting triggered in loop. Also it shows the "INVALID_STATE_ERR" and also, 'websocket is closed before the connection is established'. Primus with sockJS I am using for transports.
Note: On reconnect, I am removing(ending) the existing socket connection and want to make new socket connection with certain condition for my client session validation.
Works fine in windows machine. Only in mac this reconnect in loop is happening. Can some one suggest what the issue is?
If this issue is still happening in the latest version of Primus, please open an issue on our Github repository with steps to reproduce as it's most likely a bug in module. Also instead of removing sockets on reconnect I would suggest disabling the reconnect and just manually re-open the connection on the
end
event.