@firebase/data-connect 0.7.2-20260728185501 → 0.7.2-eap-crashlytics.e21972d2a

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/data-connect";
11
- const version = "0.7.2-20260728185501";
11
+ const version = "0.7.2-eap-crashlytics.e21972d2a";
12
12
 
13
13
  /**
14
14
  * @license
@@ -1671,13 +1671,9 @@ const IDLE_CONNECTION_TIMEOUT_MS = 15 * 1000; // 15 seconds
1671
1671
  /** Initial reconnect delay in ms */
1672
1672
  const INITIAL_RECONNECT_DELAY_MS = 1000; // 1 second
1673
1673
  /** Max reconnect delay in ms */
1674
- const MAX_RECONNECT_DELAY_MS = 30 * 1000; // 30 seconds
1675
- /** Max random jitter to add to reconnect delay in ms */
1676
- const MAX_RECONNECT_JITTER_MS = 0.5 * 1000; // 0.5 seconds
1674
+ const MAX_RECONNECT_DELAY_MS = 60 * 1000; // 60 seconds
1677
1675
  /** Factor to multiply delay by on failure */
1678
- const RECONNECT_BACKOFF_FACTOR = 1.3;
1679
- /** Max number of reconnection attempts before giving up */
1680
- const MAX_RECONNECT_ATTEMPTS = 10;
1676
+ const RECONNECT_BACKOFF_FACTOR = 1.5;
1681
1677
  /**
1682
1678
  * The base class for all Stream Transport implementations.
1683
1679
  * Handles management of logical streams (requests), authentication, data routing to query layer,
@@ -1929,15 +1925,10 @@ class AbstractDataConnectStreamTransport extends AbstractDataConnectTransport {
1929
1925
  if (this.reconnectTimer) {
1930
1926
  return;
1931
1927
  }
1932
- if (this.reconnectAttempts++ >= MAX_RECONNECT_ATTEMPTS) {
1933
- const errorString = 'Stream disconnected and could not reconnect - max stream reconnection attempts reached.';
1934
- logError(errorString);
1935
- void this.cleanupAndTerminate(Code.OTHER, errorString);
1936
- return;
1937
- }
1928
+ this.reconnectAttempts++;
1938
1929
  const delay = this.reconnectDelayMs;
1939
1930
  this.reconnectDelayMs = Math.min(this.reconnectDelayMs * RECONNECT_BACKOFF_FACTOR, MAX_RECONNECT_DELAY_MS);
1940
- const jitter = Math.random() * MAX_RECONNECT_JITTER_MS;
1931
+ const jitter = (Math.random() - 0.5) * delay;
1941
1932
  this.reconnectTimer = setTimeout(() => {
1942
1933
  this.reconnectTimer = null;
1943
1934
  void this.attemptReconnect();