diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-07 16:20:39 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-04-07 16:20:39 +0200 |
commit | 0d210e00c5beb8f83dbaea07cab408470c5ac215 (patch) | |
tree | 12382036aefbedd0f4ccb06558c536c7cd515731 /common/listener.cpp | |
parent | c210d8c434d5fa8f6c56bbbdb0cb993ddd697213 (diff) | |
download | sink-0d210e00c5beb8f83dbaea07cab408470c5ac215.tar.gz sink-0d210e00c5beb8f83dbaea07cab408470c5ac215.zip |
Send an error status messagebefore crashing.
Diffstat (limited to 'common/listener.cpp')
-rw-r--r-- | common/listener.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/listener.cpp b/common/listener.cpp index 2f5bd47..983e438 100644 --- a/common/listener.cpp +++ b/common/listener.cpp | |||
@@ -88,6 +88,12 @@ Listener::~Listener() | |||
88 | 88 | ||
89 | void Listener::emergencyAbortAllConnections() | 89 | void Listener::emergencyAbortAllConnections() |
90 | { | 90 | { |
91 | Sink::Notification n; | ||
92 | n.type = Sink::Notification::Status; | ||
93 | n.message = "The resource crashed."; | ||
94 | n.code = Sink::ApplicationDomain::ErrorStatus; | ||
95 | notify(n); | ||
96 | |||
91 | for (Client &client : m_connections) { | 97 | for (Client &client : m_connections) { |
92 | if (client.socket) { | 98 | if (client.socket) { |
93 | SinkWarning() << "Sending panic"; | 99 | SinkWarning() << "Sending panic"; |