From 1e6ff86094fa983e333348ba1fac8c27a23e8700 Mon Sep 17 00:00:00 2001 From: Kamal Mokeddem Date: Fri, 17 Mar 2017 12:06:24 -0700 Subject: [PATCH] calling m_timer.reset() detroys m_ioService which is later used in doneWorking() --- libp2p/Host.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp index 4ff179ae078..0d35273c64b 100644 --- a/libp2p/Host.cpp +++ b/libp2p/Host.cpp @@ -658,8 +658,8 @@ void Host::run(boost::system::error_code const&) // and also stops blocking worker thread, allowing worker thread to exit m_ioService.stop(); - // resetting timer signals network that nothing else can be scheduled to run - m_timer.reset(); + // cancel any pending timer + m_timer->cancel(); return; }