mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
server: Fix regression in partial message handling
If a partial message is flushed into the input pipe for CMake Server, the parser will try and parse it as a full message because of some bad loop checks. This was introduced accidentally in commit v3.10.0-rc1~365^2~2 (server: Refactor to make the event loop owned by server object, 2017-03-24).
This commit is contained in:
committed by
Brad King
parent
78f5d571e4
commit
01c42155cc
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user