net/Socket.hpp |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit a4176cf2f5deed829ed4e762fddb3429c44c8c91
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Thu Apr 6 03:32:21 2017 -0400

    wsd: don't invoke poll handler when invalidated
    
    Only during shutdown do we expect a callback
    to invalidate the pollSockets, but if it happens
    we shouldn't invoke the poll handlers.
    
    Change-Id: I2f56da19aec2f04cc871bd4eae1f93da110e0eb9
    Reviewed-on: https://gerrit.libreoffice.org/36189
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/net/Socket.hpp b/net/Socket.hpp
index bb08dca1..c726f337 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -390,6 +390,10 @@ public:
             }
         }
 
+        // This should only happen when we're stopping.
+        if (_pollSockets.size() != size)
+            return;
+
         // Fire the poll callbacks and remove dead fds.
         std::chrono::steady_clock::time_point newNow =
             std::chrono::steady_clock::now();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to