From 5af76d874e34f5f2fc4ff7b39acfaf66663bd7d0 Mon Sep 17 00:00:00 2001 From: Michael van der Werve Date: Thu, 15 Oct 2020 09:35:27 +0200 Subject: [PATCH] empty queue on error --- src/throttle.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/throttle.cpp b/src/throttle.cpp index ad09258..419e161 100644 --- a/src/throttle.cpp +++ b/src/throttle.cpp @@ -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); }