diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-03-25 03:38:52 (GMT) |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2017-07-11 00:11:27 (GMT) |
commit | d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb (patch) | |
tree | 90f665b7e1611c47ab8eaa3f069e9572d3df58fb /Source/cmFileMonitor.cxx | |
parent | 5acbf08bff643ec6779464c840bfe2f02a4e65ae (diff) | |
download | CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.zip CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.tar.gz CMake-d4f5d35ca491ede92003b26a7d0eb06aea3a2bbb.tar.bz2 |
server: Refactor to make the event loop owned by server object
Diffstat (limited to 'Source/cmFileMonitor.cxx')
-rw-r--r-- | Source/cmFileMonitor.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmFileMonitor.cxx b/Source/cmFileMonitor.cxx index 8027535..c0401d7 100644 --- a/Source/cmFileMonitor.cxx +++ b/Source/cmFileMonitor.cxx @@ -171,7 +171,9 @@ public: { if (this->Handle) { uv_fs_event_stop(this->Handle); - uv_close(reinterpret_cast<uv_handle_t*>(this->Handle), &on_fs_close); + if (!uv_is_closing(reinterpret_cast<uv_handle_t*>(this->Handle))) { + uv_close(reinterpret_cast<uv_handle_t*>(this->Handle), &on_fs_close); + } this->Handle = nullptr; } cmVirtualDirectoryWatcher::StopWatching(); |