diff options
author | Brad King <brad.king@kitware.com> | 2016-09-30 19:01:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-30 19:05:42 (GMT) |
commit | 1b43f9d12dc3d605056fcb8af442b8f0d07ff901 (patch) | |
tree | d6684546a211ebf9af70e19cba3e605c15bd1763 /Source/cmServerConnection.cxx | |
parent | 8491a539cf316f14abaf70d7be04f8929119e501 (diff) | |
download | CMake-1b43f9d12dc3d605056fcb8af442b8f0d07ff901.zip CMake-1b43f9d12dc3d605056fcb8af442b8f0d07ff901.tar.gz CMake-1b43f9d12dc3d605056fcb8af442b8f0d07ff901.tar.bz2 |
cmake-server: Stop the file monitor on client disconnect
When the client disconnects we need to remove all events from our loop.
Prior to the introduction of the file monitor we only needed to remove
the client pipes. Now we need to remove the file monitor events too.
Without this the event loop may continue to block on file monitor
events. If one does eventually come in then the event handler may try
to report it to the disconnected client and crash because our internal
structures for writing to the client have been freed.
This addresses a failure of the `Server` test on some machines.
Diffstat (limited to 'Source/cmServerConnection.cxx')
-rw-r--r-- | Source/cmServerConnection.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmServerConnection.cxx b/Source/cmServerConnection.cxx index c62ca3c..c9822d3 100644 --- a/Source/cmServerConnection.cxx +++ b/Source/cmServerConnection.cxx @@ -164,6 +164,7 @@ void cmServerConnection::ReadData(const std::string& data) void cmServerConnection::HandleEof() { + this->FileMonitor()->StopMonitoring(); this->TearDown(); } |