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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 20 23:44:06 UTC 2019


 net/Socket.hpp         |    4 ----
 wsd/DocumentBroker.cpp |   13 +++++++++++++
 wsd/DocumentBroker.hpp |    7 -------
 3 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit b5154eaf691e3a32f100bbf435e98ac5c9c56035
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue May 21 01:28:12 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Tue May 21 02:40:28 2019 +0300

    Make the document-specific threads in the iOS app go away more reliably
    
    After a document is closed, the prisoner_poll, accept_poll,
    websrv_poll, docbroker_nnn, and lokit_main threads that served that
    document are supposed to go away as quickly and reliably as possible.
    This change improves that significantly.
    
    Change-Id: If658bea74f70a77d2d537f0ec6455a6b36f2667e

diff --git a/net/Socket.hpp b/net/Socket.hpp
index c7712339e..0764df159 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -1118,10 +1118,6 @@ protected:
 #if !MOBILEAPP
         return ::write(getFD(), buf, len);
 #else
-        struct pollfd p;
-        p.fd = getFD();
-        p.events = POLLOUT;
-        fakeSocketPoll(&p, 1, -1);
         return fakeSocketWrite(getFD(), buf, len);
 #endif
     }
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index be53dcfd7..a2fb6f2ab 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -146,6 +146,19 @@ public:
     {
     }
 
+    bool continuePolling() override
+    {
+#if MOBILEAPP
+        if (MobileTerminationFlag)
+        {
+            LOG_TRC("Noticed MobileTerminationFlag.");
+            MobileTerminationFlag = false;
+            return false;
+        }
+#endif
+        return TerminatingPoll::continuePolling();
+    }
+
     virtual void pollingThread()
     {
         // Delegate to the docBroker.
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 2846af92a..0642599c2 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -48,13 +48,6 @@ public:
 
     bool continuePolling() override
     {
-#if MOBILEAPP
-        if (MobileTerminationFlag)
-        {
-            MobileTerminationFlag = false;
-            return false;
-        }
-#endif
         return SocketPoll::continuePolling() && !TerminationFlag;
     }
 };


More information about the Libreoffice-commits mailing list