From 48980896d5a1b42235b6804c57b60c836b28123d Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 13 Nov 2018 11:00:18 +0100 Subject: [PATCH] exit natpmp::on_reply earlier if we're shutting down --- src/natpmp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/natpmp.cpp b/src/natpmp.cpp index ce5172eb0..4634f2e91 100644 --- a/src/natpmp.cpp +++ b/src/natpmp.cpp @@ -430,6 +430,8 @@ void natpmp::on_reply(error_code const& e return; } + if (m_abort) return; + #if defined TORRENT_ASIO_DEBUGGING add_outstanding_async("natpmp::on_reply"); #endif @@ -582,8 +584,6 @@ void natpmp::on_reply(error_code const& e l.lock(); } - if (m_abort) return; - m_currently_mapping = -1; m->action = mapping_t::action_none; m_send_timer.cancel(ec);