net/Socket.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 7ca1f03770c117a316b23644306160a6a80ea583 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon Apr 3 23:13:03 2017 -0400 wsd: don't invoke onDisconnect from wrong thread ...and warn if we are in the wrong thread. This can happen when the socket is not properly closed from the poll thread and is being destroyed. Change-Id: I749c09b15d04b49038f7cee6a7a13e8f0145acff Reviewed-on: https://gerrit.libreoffice.org/36057 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 9cf83c49..9e06a040 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -610,7 +610,12 @@ public: LOG_DBG("StreamSocket dtor #" << getFD()); if (!_closed) - _socketHandler->onDisconnect(); + { + if (isCorrectThread()) + _socketHandler->onDisconnect(); + else + LOG_WRN("#" << getFD() << " not properly shutdown. onDisconnect not called."); + } if (!_shutdownSignalled) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits