Skip to content

Commit b3dad2b

Browse files
Stop the service on error.
This way the watcher will release all RAM used for watching the inodes on linux.
1 parent 7421623 commit b3dad2b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

js/spec/index-spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ describe('Node Sentinel File Watcher', function() {
558558

559559
assert.ok(erroredOut);
560560
} finally {
561-
await watch.stop();
562561
watch = null;
563562
}
564563
});

src/NSFW.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ void NSFW::pollForEvents() {
293293
std::lock_guard<std::mutex> lock(mRunningLock);
294294
mRunning = false;
295295
}
296+
mInterface.reset(nullptr);
297+
mPollThread.detach();
298+
Unref();
296299
break;
297300
}
298301

0 commit comments

Comments
 (0)