diff options
-rw-r--r-- | loolwsd/IoUtil.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp index 90483ac82..085422d91 100644 --- a/loolwsd/IoUtil.cpp +++ b/loolwsd/IoUtil.cpp @@ -155,6 +155,7 @@ void SocketProcessor(const std::shared_ptr<WebSocket>& ws, payload.resize(size); n = ws->receiveFrame(payload.data(), size, flags); + payload.resize(n > 0 ? n : 0); } } |