metarhia / jstp

Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
https://metarhia.github.io/jstp
Other
142 stars 10 forks source link

conn: make reconnection consistent #386

Closed belochub closed 5 years ago

belochub commented 5 years ago

Completely disable reconnection before establishing a JSTP connection successfully for at least one time.

Before, reconnection retries were implicitly happening before successfully establishing JSTP connection in a case when transport (tcp/tls/ws) connection was successfully established, but JSTP handshake failed. At the same time, reconnection was disabled whenever it was not possible to establish a transport connection to the server.

belochub commented 5 years ago

Landed in https://github.com/metarhia/jstp/commit/dd0d80a7641b904e830a316eab81d6d86158b12d.