diff --git a/contrib/epee/include/console_handler.h b/contrib/epee/include/console_handler.h index 1b716fca4..a7788aeb8 100644 --- a/contrib/epee/include/console_handler.h +++ b/contrib/epee/include/console_handler.h @@ -606,11 +606,15 @@ eof: async_console_handler m_console_handler; public: ~console_handlers_binder() { - stop_handling(); - if (m_console_thread.get() != nullptr) + try { - m_console_thread->join(); + stop_handling(); + if (m_console_thread.get() != nullptr) + { + m_console_thread->join(); + } } + catch (const std::exception &e) { /* ignore */ } } bool start_handling(std::function prompt, const std::string& usage_string = "", std::function exit_handler = NULL)