UNPKG

@microsoft/signalr

Version:
14 lines 667 B
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // 0, 2, 10, 30 second delays before reconnect attempts. const DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null]; /** @private */ export class DefaultReconnectPolicy { constructor(retryDelays) { this._retryDelays = retryDelays !== undefined ? [...retryDelays, null] : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS; } nextRetryDelayInMilliseconds(retryContext) { return this._retryDelays[retryContext.previousRetryCount]; } } //# sourceMappingURL=DefaultReconnectPolicy.js.map