[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - net/Socket.hpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 20 22:32:12 UTC 2019


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

New commits:
commit 92a860538e88854abd82468652c904afae4530c2
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 01:30:47 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 2fcc124d7..f64b2c362 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 d33337cc1..a222f5d5c 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -156,6 +156,19 @@ public:
     {
     }
 
+    bool continuePolling() override
+    {
+#if MOBILEAPP
+        if (MobileTerminationFlag)
+        {
+            LOG_ERR("===> 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 dc2c19252..e470d0c8c 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