empty queue on error

This commit is contained in:
Michael van der Werve 2020-10-15 09:35:27 +02:00
parent 2e49fd1220
commit 5af76d874e
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ bool Throttle::send(uint64_t id, const Frame &frame)
*/
void Throttle::reportError(const char *message)
{
// assign empty queue
_queue = {};
// if a callback is set, call the handler with the message
if (_errorCallback) _errorCallback(message);
}