summaryrefslogtreecommitdiffstats
path: root/common/listener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/listener.cpp')
-rw-r--r--common/listener.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/listener.cpp b/common/listener.cpp
index 28748e5..de20b2c 100644
--- a/common/listener.cpp
+++ b/common/listener.cpp
@@ -87,6 +87,23 @@ Listener::~Listener()
87{ 87{
88} 88}
89 89
90void Listener::emergencyAbortAllConnections()
91{
92 for (Client &client : m_connections) {
93 if (client.socket) {
94 Warning() << "Sending panic";
95 client.socket->write("PANIC");
96 client.socket->waitForBytesWritten();
97 disconnect(client.socket, 0, this, 0);
98 client.socket->abort();
99 delete client.socket;
100 client.socket = 0;
101 }
102 }
103
104 m_connections.clear();
105}
106
90void Listener::closeAllConnections() 107void Listener::closeAllConnections()
91{ 108{
92 for (Client &client : m_connections) { 109 for (Client &client : m_connections) {