summaryrefslogtreecommitdiffstats
path: root/synchronizer
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-20 18:26:33 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-23 17:37:53 +0200
commit3c3c117b96f0063221889d3e896cdbadd1b36a99 (patch)
tree1983376a76f22f9ccc11dcf10db9a4fe95a198cd /synchronizer
parente4ccf5097e53695d130b1dbfe25c8384766162ad (diff)
downloadsink-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.
Diffstat (limited to 'synchronizer')
-rw-r--r--synchronizer/listener.cpp1
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;