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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 19 11:41:36 UTC 2018


 net/Socket.hpp |   13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

New commits:
commit d6d0c3e8a32671f57bbff852ac45796cd4613d35
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Oct 19 12:40:09 2018 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Oct 19 13:41:18 2018 +0200

    As far as I see, no getPollEvents() implementation will ever return negative
    
    In 1c7f94045a433625f9ec55b137bbd0322f27d532 that introduced
    DelaySocket, its getPollEvents() could indeed return -1, but that was
    removed later.
    
    Change-Id: Ie3a7e01b7b9a7517d97f6ed3cc6d96bdb3313969
    Reviewed-on: https://gerrit.libreoffice.org/61990
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 734d3696a..2d8a2f26a 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -713,16 +713,9 @@ private:
         for (size_t i = 0; i < size; ++i)
         {
             int events = _pollSockets[i]->getPollEvents(now, timeoutMaxMs);
-            if (events < 0) // timeout on dead socket
-            {
-                _pollFds[i].fd = _wakeup[0];
-                _pollFds[i].events = 0;
-            }
-            else
-            {
-                _pollFds[i].fd = _pollSockets[i]->getFD();
-                _pollFds[i].events = events;
-            }
+            assert(events >= 0); // Or > 0 even?
+            _pollFds[i].fd = _pollSockets[i]->getFD();
+            _pollFds[i].events = events;
             _pollFds[i].revents = 0;
         }
 


More information about the Libreoffice-commits mailing list