diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-05-16 11:48:42 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-05-16 11:48:42 +0200 |
commit | 0226ed393837e753d4afe0349c28263d3c406f90 (patch) | |
tree | cbbccff057f02b579413e9d3223d155015509b76 /src/EtiReader.cpp | |
parent | 1c110d11ae3d3181ed37c941fa7e622d332eb520 (diff) | |
download | dabmod-0226ed393837e753d4afe0349c28263d3c406f90.tar.gz dabmod-0226ed393837e753d4afe0349c28263d3c406f90.tar.bz2 dabmod-0226ed393837e753d4afe0349c28263d3c406f90.zip |
Handle Ctrl-C when using EDI input
Diffstat (limited to 'src/EtiReader.cpp')
-rw-r--r-- | src/EtiReader.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/EtiReader.cpp b/src/EtiReader.cpp index c1b7445..4c5ad79 100644 --- a/src/EtiReader.cpp +++ b/src/EtiReader.cpp @@ -591,14 +591,13 @@ void EdiUdpInput::Open(const std::string& uri) bool EdiUdpInput::rxPacket() { - try { - auto udp_data = m_udp_rx.get_packet_buffer(); - m_decoder.push_packet(udp_data); - return true; - } - catch (std::runtime_error& e) { - etiLog.level(warn) << "EDI input: " << e.what(); + auto udp_data = m_udp_rx.get_packet_buffer(); + + if (udp_data.empty()) { return false; } + + m_decoder.push_packet(udp_data); + return true; } #endif // HAVE_EDI |