diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-20 18:26:33 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-07-23 17:37:53 +0200 |
commit | 3c3c117b96f0063221889d3e896cdbadd1b36a99 (patch) | |
tree | 1983376a76f22f9ccc11dcf10db9a4fe95a198cd | |
parent | e4ccf5097e53695d130b1dbfe25c8384766162ad (diff) | |
download | sink-3c3c117b96f0063221889d3e896cdbadd1b36a99.tar.gz sink-3c3c117b96f0063221889d3e896cdbadd1b36a99.zip |
Avoid slots being called after the clients have been cleaned up already.
It is possible that the clientDropped slot is called when we close the
socket, so better disconnect everythign first.
-rw-r--r-- | synchronizer/listener.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index 2559664..60577ac 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp | |||
@@ -97,6 +97,7 @@ void Listener::closeAllConnections() | |||
97 | { | 97 | { |
98 | for (Client &client: m_connections) { | 98 | for (Client &client: m_connections) { |
99 | if (client.socket) { | 99 | if (client.socket) { |
100 | disconnect(client.socket, 0, this, 0); | ||
100 | client.socket->close(); | 101 | client.socket->close(); |
101 | delete client.socket; | 102 | delete client.socket; |
102 | client.socket = 0; | 103 | client.socket = 0; |