diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-06-15 10:32:43 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-06-15 10:32:43 +0200 |
commit | 9e94a93378141c84d7a5a7346c63b32adf912919 (patch) | |
tree | 84e861742289dfb67fd6b679dcaa72e525001262 /src | |
parent | bd6d1656cfcca1f0f351defcd3dcfa617812a909 (diff) | |
download | dabmux-9e94a93378141c84d7a5a7346c63b32adf912919.tar.gz dabmux-9e94a93378141c84d7a5a7346c63b32adf912919.tar.bz2 dabmux-9e94a93378141c84d7a5a7346c63b32adf912919.zip |
EDI input: flush state on exception
Diffstat (limited to 'src')
-rw-r--r-- | src/input/Edi.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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)); } } } |