[Libreoffice-commits] online.git: net/Socket.hpp net/WebSocketHandler.hpp

Jan Holesovsky kendy at collabora.com
Wed Apr 19 09:11:53 UTC 2017


 net/Socket.hpp           |    4 ++--
 net/WebSocketHandler.hpp |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 47ca32beb5659a58655a1cef6cc61b6aaccd355a
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Apr 19 11:07:55 2017 +0200

    We never call setNoDelay() with false.
    
    Change-Id: I865027300559b185222f21faa48ccd32100bd02d

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 70b229b3..8c07e38d 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -84,9 +84,9 @@ public:
     virtual HandleResult handlePoll(std::chrono::steady_clock::time_point now, int events) = 0;
 
     /// manage latency issues around packet aggregation
-    void setNoDelay(bool noDelay = true)
+    void setNoDelay()
     {
-        int val = noDelay ? 1 : 0;
+        const int val = 1;
         setsockopt (_fd, IPPROTO_TCP, TCP_NODELAY,
                     (char *) &val, sizeof(val));
     }
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index a863afad..14d97f81 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -417,7 +417,6 @@ protected:
         LOG_INF("#" << socket->getFD() << ": WebSocket version: " << wsVersion <<
                 ", key: [" << wsKey << "], protocol: [" << wsProtocol << "].");
 
-        socket->setNoDelay();
 #if ENABLE_DEBUG
         if (std::getenv("LOOL_ZERO_BUFFER_SIZE"))
             socket->setSocketBufferSize(0);


More information about the Libreoffice-commits mailing list