Extract reset error

This commit is contained in:
Andras Schmelczer 2025-03-22 17:07:04 +00:00
commit a937f64fa0
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -1,7 +1,7 @@
import type { Settings } from "../persistence/settings";
import type { Logger } from "../tracing/logger";
import { createPromise } from "../utils/create-promise";
import { sleep } from "../utils/sleep";
import { SyncResetError } from "./sync-reset-error";
export class ConnectionStatus {
private static readonly UNTIL_RESOLUTION = Symbol();
@ -40,7 +40,7 @@ export class ConnectionStatus {
}
public reset(): void {
this.rejectUntil(new Error("Sync was reset"));
this.rejectUntil(new SyncResetError());
[this.until, this.resolveUntil, this.rejectUntil] = createPromise();
}