in case of a connection error, we no longer call the channel wide error handler
This commit is contained in:
parent
e903cdb4ee
commit
e0b709fa63
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue