From 9e94a93378141c84d7a5a7346c63b32adf912919 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 15 Jun 2021 10:32:43 +0200 Subject: EDI input: flush state on exception --- src/input/Edi.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp index be1b4a3..3442f1f 100644 --- a/src/input/Edi.cpp +++ b/src/input/Edi.cpp @@ -382,11 +382,13 @@ void Edi::m_run() } catch (const invalid_argument& e) { etiLog.level(warn) << "EDI input " << m_name << " exception: " << e.what(); - this_thread::sleep_for(chrono::milliseconds(24)); + m_sti_decoder.push_bytes({}); // Push an empty frame to clear the internal state + this_thread::sleep_for(chrono::milliseconds(8)); } catch (const runtime_error& e) { etiLog.level(warn) << "EDI input " << m_name << " exception: " << e.what(); - this_thread::sleep_for(chrono::milliseconds(24)); + m_sti_decoder.push_bytes({}); // Push an empty frame to clear the internal state + this_thread::sleep_for(chrono::milliseconds(8)); } } } -- cgit v1.2.3