From 2a08bb5feb1d6809c7dbb4d436d973e0dd5e0cbf Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 14 Jul 2012 20:37:31 +0000 Subject: [PATCH] fix shutdown hang issue in connection queue --- ChangeLog | 2 ++ src/connection_queue.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b02bd5b2f..71e0de139 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ * fix uTP edge case where udp socket buffer fills up * fix nagle implementation in uTP + * fix race condition causing shutdown hang + 0.16.2 release * fix permissions issue on linux whith noatime enabled for non-owned files diff --git a/src/connection_queue.cpp b/src/connection_queue.cpp index 34f031944..3a4caaa26 100644 --- a/src/connection_queue.cpp +++ b/src/connection_queue.cpp @@ -277,7 +277,8 @@ namespace libtorrent #endif TORRENT_ASSERT(!e || e == error::operation_aborted); - if (e) return; + if (e && m_num_connecting == 0) + return; ptime next_expire = max_time(); ptime now = time_now_hires() + milliseconds(100);