123456789101112131415161718 |
- "use strict";
- // Licensed to the .NET Foundation under one or more agreements.
- // The .NET Foundation licenses this file to you under the MIT license.
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.DefaultReconnectPolicy = void 0;
- // 0, 2, 10, 30 second delays before reconnect attempts.
- const DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null];
- /** @private */
- class DefaultReconnectPolicy {
- constructor(retryDelays) {
- this._retryDelays = retryDelays !== undefined ? [...retryDelays, null] : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS;
- }
- nextRetryDelayInMilliseconds(retryContext) {
- return this._retryDelays[retryContext.previousRetryCount];
- }
- }
- exports.DefaultReconnectPolicy = DefaultReconnectPolicy;
- //# sourceMappingURL=DefaultReconnectPolicy.js.map
|