We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 486c905 commit 1fce0dfCopy full SHA for 1fce0df
src/packages/sync/table/changefeed-nats2.ts
@@ -9,6 +9,11 @@ import { delay } from "awaiting";
9
10
const HEARTBEAT = 15000;
11
12
+// this should be significantly shorter than HEARTBEAT.
13
+// if user closes browser and comes back, then this is the time they may have to wait
14
+// for their changefeeds to reconnect, since clock jumps forward...
15
+const HEARTBEAT_CHECK_DELAY = 3000;
16
+
17
export class NatsChangefeed extends EventEmitter {
18
private account_id: string;
19
private query;
@@ -106,7 +111,7 @@ export class NatsChangefeed extends EventEmitter {
106
111
this.close();
107
112
return;
108
113
}
109
- await delay(HEARTBEAT / 2);
114
+ await delay(HEARTBEAT_CHECK_DELAY);
110
115
116
};
117
0 commit comments