diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-22 13:12:02 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-22 13:12:02 +0200 |
commit | ecf5bd3c4fd8557b06c6849b317d8d3ccaca528f (patch) | |
tree | 6d7d038b6d705356040e8b1f331c075f90b7c690 /common/resourceaccess.cpp | |
parent | 6864e4accaafa4fa90332719bff5a85a0e92b242 (diff) | |
download | sink-ecf5bd3c4fd8557b06c6849b317d8d3ccaca528f.tar.gz sink-ecf5bd3c4fd8557b06c6849b317d8d3ccaca528f.zip |
A better crashhandler that notifies the client of the crash.
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 458694f..991c930 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -474,7 +474,11 @@ void ResourceAccess::disconnected() | |||
474 | 474 | ||
475 | void ResourceAccess::connectionError(QLocalSocket::LocalSocketError error) | 475 | void ResourceAccess::connectionError(QLocalSocket::LocalSocketError error) |
476 | { | 476 | { |
477 | if (error == QLocalSocket::PeerClosedError) { | 477 | const bool resourceCrashed = d->partialMessageBuffer.contains("PANIC"); |
478 | if (resourceCrashed) { | ||
479 | ErrorMsg() << "The resource crashed!"; | ||
480 | d->abortPendingOperations(); | ||
481 | } else if (error == QLocalSocket::PeerClosedError) { | ||
478 | Log() << "The resource closed the connection."; | 482 | Log() << "The resource closed the connection."; |
479 | d->abortPendingOperations(); | 483 | d->abortPendingOperations(); |
480 | } else { | 484 | } else { |