@microsoft/signalr
Version:
ASP.NET Core SignalR Client
18 lines • 960 B
JavaScript
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
// 0, 2, 10, 30 second delays before reconnect attempts.
var DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null];
/** @private */
var DefaultReconnectPolicy = /** @class */ (function () {
function DefaultReconnectPolicy(retryDelays) {
this.retryDelays = retryDelays !== undefined ? retryDelays.concat([null]) : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS;
}
DefaultReconnectPolicy.prototype.nextRetryDelayInMilliseconds = function (retryContext) {
return this.retryDelays[retryContext.previousRetryCount];
};
return DefaultReconnectPolicy;
}());
exports.DefaultReconnectPolicy = DefaultReconnectPolicy;
//# sourceMappingURL=DefaultReconnectPolicy.js.map
;