UNPKG

531 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.DefaultListWatchErrorStrategy = void 0;
4const DefaultListWatchErrorStrategy = (err, errCount) => {
5 if (err.code === "ECONNRESET") {
6 return {
7 resync: false,
8 backoff: 100 * (Math.min(errCount, 10) - 1),
9 };
10 }
11 return {
12 resync: true,
13 backoff: 10000,
14 };
15};
16exports.DefaultListWatchErrorStrategy = DefaultListWatchErrorStrategy;
17//# sourceMappingURL=resource_listwatch_error.js.map
\No newline at end of file