diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-01-06 10:44:40 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-01-22 14:52:40 +0100 |
commit | 9811b0fc988d1562be76a5e9e26cd86e45c30b80 (patch) | |
tree | 7ec97c1ec040ddbd3894576445bfaf611404552e /net/Socket.cpp | |
parent | Hide 'styles' listbox on loading mobile (diff) | |
download | online-9811b0fc988d1562be76a5e9e26cd86e45c30b80.tar.gz online-9811b0fc988d1562be76a5e9e26cd86e45c30b80.zip |
wsd: reduce warnings
Don't stop the polling thread and attempt cleanup
when the thread is no longer alive; just avoid
logging warnings and other noise.
Demote a couple warning logs to info since
they are neither critical nor actionable.
Change-Id: Ibe8e8491723f1beeaea03a6e935d606b01e275f0
Diffstat (limited to 'net/Socket.cpp')
-rw-r--r-- | net/Socket.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/Socket.cpp b/net/Socket.cpp index 44f5d18a40..2d35f6b02f 100644 --- a/net/Socket.cpp +++ b/net/Socket.cpp @@ -136,11 +136,15 @@ bool SocketPoll::startThread() void SocketPoll::joinThread() { - addCallback([this]() - { - removeSockets(); - }); - stop(); + if (isAlive()) + { + addCallback([this]() + { + removeSockets(); + }); + stop(); + } + if (_threadStarted && _thread.joinable()) { if (_thread.get_id() == std::this_thread::get_id()) |