in case of a connection error, we no longer call the channel wide error handler

This commit is contained in:
Emiel Bruijntjes 2014-04-16 12:04:44 +02:00
parent e903cdb4ee
commit e0b709fa63
2 changed files with 5 additions and 4 deletions

View File

@ -481,9 +481,10 @@ public:
/** /**
* Report an error message on a channel * Report an error message on a channel
* @param message * @param message the error message
* @param notifyhandler should the channel-wide handler also be called?
*/ */
void reportError(const char *message) void reportError(const char *message, bool notifyhandler = true)
{ {
// change state // change state
_state = state_closed; _state = state_closed;
@ -521,7 +522,7 @@ public:
_newestCallback = nullptr; _newestCallback = nullptr;
// inform handler // inform handler
if (_errorCallback) _errorCallback(message); if (notifyhandler && _errorCallback) _errorCallback(message);
} }
/** /**

View File

@ -285,7 +285,7 @@ public:
for (auto &iter : _channels) for (auto &iter : _channels)
{ {
// report the errors // report the errors
iter.second->reportError(message); iter.second->reportError(message, false);
// leap out if no longer valid // leap out if no longer valid
if (!monitor.valid()) return; if (!monitor.valid()) return;