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

lib: fix resendable calls being sent twice #369

Closed belochub closed 6 years ago

belochub commented 6 years ago

Due to the callbacks receiving error ERR_CALLBACK_LOST being called synchronously during session restoration, calls with resending were being resent twice: first time at the moment of such callback call (leading to saving the call message into the session's buffer) and second time immediately after the procedure of the session restoration while resending all of the buffered messages (that by that moment include unwanted call messages).

belochub commented 6 years ago

Landed in https://github.com/metarhia/jstp/commit/2da3c9a4f7743229bc67e68441f6ed1aa4969984.