summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
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();