@firebase/database 1.0.11-canary.190cd6217 → 1.0.11-canary.28eaaf4ba

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -8,7 +8,7 @@ var util = require('@firebase/util');
8
8
  var logger$1 = require('@firebase/logger');
9
9
 
10
10
  const name = "@firebase/database";
11
- const version = "1.0.11-canary.190cd6217";
11
+ const version = "1.0.11-canary.28eaaf4ba";
12
12
 
13
13
  /**
14
14
  * @license
@@ -3745,7 +3745,7 @@ class PersistentConnection extends ServerActions {
3745
3745
  }
3746
3746
  this.lastConnectionEstablishedTime_ = null;
3747
3747
  }
3748
- const timeSinceLastConnectAttempt = new Date().getTime() - this.lastConnectionAttemptTime_;
3748
+ const timeSinceLastConnectAttempt = Math.max(0, new Date().getTime() - this.lastConnectionAttemptTime_);
3749
3749
  let reconnectDelay = Math.max(0, this.reconnectDelay_ - timeSinceLastConnectAttempt);
3750
3750
  reconnectDelay = Math.random() * reconnectDelay;
3751
3751
  this.log_('Trying to reconnect in ' + reconnectDelay + 'ms');