[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/socket.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Feb 20 04:34:37 UTC 2017


 net/socket.hpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4a5e8d22e5665ed74443430228c7df01f9ba0913
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Feb 19 14:44:19 2017 -0500

    nb: retry reading only when the buffer is full
    
    We expect to have more data if the buffer was
    filled completely. Otherwise, there is no
    reason to suspect there is more data, unless
    we hope to have received time in that short
    interval, which is not very likely.
    
    Change-Id: I9a3dcb6378e8dcfa0d49b6c7ea92d7cec6690787
    Reviewed-on: https://gerrit.libreoffice.org/34446
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/net/socket.hpp b/net/socket.hpp
index a88f98d..400d940 100644
--- a/net/socket.hpp
+++ b/net/socket.hpp
@@ -343,7 +343,7 @@ public:
             }
             // else poll will handle errors.
         }
-        while (false);
+        while (len == (sizeof(buf) - 1));
 
         return len != 0; // zero is eof / clean socket close.
     }


More information about the Libreoffice-commits mailing list