fix: wrap _rpcWebSocketGeneration around when about to overflow (#28428)
This commit is contained in:
parent
f896513864
commit
5d172151a2
|
@ -5084,7 +5084,8 @@ export class Connection {
|
|||
*/
|
||||
_wsOnClose(code: number) {
|
||||
this._rpcWebSocketConnected = false;
|
||||
this._rpcWebSocketGeneration++;
|
||||
this._rpcWebSocketGeneration =
|
||||
(this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
|
||||
if (this._rpcWebSocketIdleTimeout) {
|
||||
clearTimeout(this._rpcWebSocketIdleTimeout);
|
||||
this._rpcWebSocketIdleTimeout = null;
|
||||
|
|
Loading…
Reference in New Issue