summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-20 15:23:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-20 15:23:48 (GMT)
commitd5624a40f2c99a4beb27e5914c2fa9cecce259c9 (patch)
tree4f220f643de57db2ad90e52ee9dc206450b8e4e2 /Source
parent08ce62bee5bee6805fbb01c1821c438028e858dc (diff)
parent01c42155cca188901214abbbf79317f853fe164d (diff)
downloadCMake-d5624a40f2c99a4beb27e5914c2fa9cecce259c9.zip
CMake-d5624a40f2c99a4beb27e5914c2fa9cecce259c9.tar.gz
CMake-d5624a40f2c99a4beb27e5914c2fa9cecce259c9.tar.bz2
Merge topic 'fix-cmake-server-bad-buffering'
01c42155 server: Fix regression in partial message handling Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: jdavidberger <j.david.berger@gmail.com> Merge-request: !1498
Diffstat (limited to 'Source')
-rw-r--r--Source/cmConnection.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmConnection.cxx b/Source/cmConnection.cxx
index f482412..28ba12c 100644
--- a/Source/cmConnection.cxx
+++ b/Source/cmConnection.cxx
@@ -97,11 +97,10 @@ void cmEventBasedConnection::ReadData(const std::string& data)
this->RawReadBuffer += data;
if (BufferStrategy) {
std::string packet = BufferStrategy->BufferMessage(this->RawReadBuffer);
- do {
+ while (!packet.empty()) {
ProcessRequest(packet);
packet = BufferStrategy->BufferMessage(this->RawReadBuffer);
- } while (!packet.empty());
-
+ }
} else {
ProcessRequest(this->RawReadBuffer);
this->RawReadBuffer.clear();