diff options
Diffstat (limited to 'Source/cmServerConnection.cxx')
-rw-r--r-- | Source/cmServerConnection.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index 89ee6d8..c62ca3c 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -4,7 +4,8 @@ #include "cmServerDictionary.h" -#include <cmServer.h> +#include "cmFileMonitor.h" +#include "cmServer.h" #include <assert.h> @@ -64,10 +65,16 @@ public: : Connection(connection) { Connection->mLoop = uv_default_loop(); + if (Connection->mLoop) { + Connection->mFileMonitor = new cmFileMonitor(Connection->mLoop); + } } ~LoopGuard() { + if (Connection->mFileMonitor) { + delete Connection->mFileMonitor; + } uv_loop_close(Connection->mLoop); Connection->mLoop = nullptr; } |