Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,7 @@ nsfw.actions = {
## Installation
NSFW is a native node module and requires Node-Gyp to be functional before you can install it.
Make sure you have completed installing all of the dependencies listed for [Node-Gyp](https://github.com/nodejs/node-gyp) on your operating system.

## Breaking changes
Prior to version 2.3.0 when the service receive an error, the service is shutdown but the watcher is not stopped.
Now when the service receives an error, the watcher stops releasing all resources, so if you try to stop the service after an error, you will get an exception.
1 change: 0 additions & 1 deletion js/spec/index-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ describe('Node Sentinel File Watcher', function() {

assert.ok(erroredOut);
} finally {
await watch.stop();
watch = null;
}
});
Expand Down
3 changes: 3 additions & 0 deletions src/NSFW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ void NSFW::pollForEvents() {
std::lock_guard<std::mutex> lock(mRunningLock);
mRunning = false;
}
mInterface.reset(nullptr);
mPollThread.detach();
Unref();
break;
}

Expand Down