[Libreoffice-commits] online.git: wsd/ProxyProtocol.cpp

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 24 14:46:09 UTC 2020


 wsd/ProxyProtocol.cpp |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d334785dce500e5470cb88436084495ef3ff7c68
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Mar 21 20:03:37 2020 +0000
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Apr 24 16:45:50 2020 +0200

    Proxy: don't leave out sockets lingering around for the !flush case.
    
    Change-Id: I13ad123a6c3a068a676eae5e509367e727e9ac06
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92814
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/ProxyProtocol.cpp b/wsd/ProxyProtocol.cpp
index 89b3d9ba9..3ed43e979 100644
--- a/wsd/ProxyProtocol.cpp
+++ b/wsd/ProxyProtocol.cpp
@@ -181,11 +181,14 @@ void ProxyProtocolHandler::handleIncomingMessage(SocketDisposition &disposition)
 int ProxyProtocolHandler::sendMessage(const char *msg, const size_t len, bool text, bool flush)
 {
     _writeQueue.push_back(std::make_shared<Message>(msg, len, text));
-    auto sock = popOutSocket();
-    if (sock && flush)
+    if (flush)
     {
-        flushQueueTo(sock);
-        sock->shutdown();
+        auto sock = popOutSocket();
+        if (sock)
+        {
+            flushQueueTo(sock);
+            sock->shutdown();
+        }
     }
 
     return len;


More information about the Libreoffice-commits mailing list