summaryrefslogtreecommitdiffstats
path: root/Source/cmFileMonitor.cxx
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2017-03-25 03:38:52 (GMT)
committerJustin Berger <j.david.berger@gmail.com>2017-07-11 00:11:27 (GMT)
commitd4f5d35ca491ede92003b26a7d0eb06aea3a2bbb (patch)
tree90f665b7e1611c47ab8eaa3f069e9572d3df58fb /Source/cmFileMonitor.cxx
parent5acbf08bff643ec6779464c840bfe2f02a4e65ae (diff)
downloadCMake-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.cxx4
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();