Skip to content

Commit 1249ca6

Browse files
fix: guard against monitor check running while monitor check is in progress
1 parent 89e2235 commit 1249ca6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sdam/monitor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ function checkServer(monitor: Monitor, callback: Callback<Document | null>) {
328328

329329
function monitorServer(monitor: Monitor) {
330330
return (callback: Callback) => {
331+
if (monitor.s.state === STATE_MONITORING) {
332+
callback();
333+
return;
334+
}
331335
stateTransition(monitor, STATE_MONITORING);
332336
function done() {
333337
if (!isInCloseState(monitor)) {

0 commit comments

Comments
 (0)