Skip to content

Commit 9377f7b

Browse files
fix: guard against monitor check running while monitor check is in progress
1 parent b8b765b commit 9377f7b

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
@@ -335,6 +335,10 @@ function checkServer(monitor: Monitor, callback: Callback<Document | null>) {
335335

336336
function monitorServer(monitor: Monitor) {
337337
return (callback: Callback) => {
338+
if (monitor.s.state === STATE_MONITORING) {
339+
callback();
340+
return;
341+
}
338342
stateTransition(monitor, STATE_MONITORING);
339343
function done() {
340344
if (!isInCloseState(monitor)) {

0 commit comments

Comments
 (0)