diff --git a/src/udp_collector.cpp b/src/udp_collector.cpp index 0511da9..179bcac 100644 --- a/src/udp_collector.cpp +++ b/src/udp_collector.cpp @@ -144,7 +144,11 @@ struct UDPCollector : public std::enable_shared_from_this static void handle_static(evutil_socket_t fd, short ev, void *raw) { (void)fd; - static_cast(raw)->handle(ev); + try { + static_cast(raw)->handle(ev); + }catch(std::exception& e) { + log_printf(logio, PLVL_CRIT, "Ignoring unhandled exception in UDPManager::handle(): %s\n", e.what()); + } } };