Reconnect within MessageReceiver

This commit is contained in:
Fedor Indutny 2021-06-23 07:47:42 -07:00 committed by GitHub
parent 0ec23be91b
commit a6394e0c8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 24 deletions

View file

@ -1,6 +1,20 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
const SECOND = 1000;
export const FIBONACCI_TIMEOUTS: ReadonlyArray<number> = [
1 * SECOND,
2 * SECOND,
3 * SECOND,
5 * SECOND,
8 * SECOND,
13 * SECOND,
21 * SECOND,
34 * SECOND,
55 * SECOND,
];
export class BackOff {
private count = 0;