We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ec1c76 commit c20267bCopy full SHA for c20267b
packages/database/src/core/PersistentConnection.ts
@@ -797,8 +797,10 @@ export class PersistentConnection extends ServerActions {
797
this.lastConnectionEstablishedTime_ = null;
798
}
799
800
- const timeSinceLastConnectAttempt =
801
- new Date().getTime() - this.lastConnectionAttemptTime_;
+ const timeSinceLastConnectAttempt = Math.max(
+ 0,
802
+ new Date().getTime() - this.lastConnectionAttemptTime_
803
+ );
804
let reconnectDelay = Math.max(
805
0,
806
this.reconnectDelay_ - timeSinceLastConnectAttempt
0 commit comments