diff --git a/src/monitor/src/protocol/Message.cc b/src/monitor/src/protocol/Message.cc index e953a680fa..15376f35ce 100644 --- a/src/monitor/src/protocol/Message.cc +++ b/src/monitor/src/protocol/Message.cc @@ -173,7 +173,8 @@ int zlib_decompress(const std::string& in, std::string& out) rc = inflate(&zs, Z_FINISH); - if ( rc != Z_STREAM_END && rc != Z_OK ) + if ( (rc != Z_STREAM_END && rc != Z_OK && rc != Z_BUF_ERROR) + || (rc == Z_BUF_ERROR && zs.avail_out == ZBUFFER) ) { inflateEnd(&zs);