From 3899255f1cb2ac69e44e187391f3dd78716b4b4c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 17 Dec 2022 14:10:10 -0600 Subject: [PATCH] fix: tear down utp _after_ peer-mgr (#4383) --- libtransmission/session.cc | 2 +- libtransmission/session.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/session.cc b/libtransmission/session.cc index 335b0f73f..8a6adde79 100644 --- a/libtransmission/session.cc +++ b/libtransmission/session.cc @@ -1248,7 +1248,6 @@ void tr_session::closeImplPart1(std::promise* closed_promise, std::chrono: tr_torrentFreeInSessionThread(tor); } torrents.clear(); - tr_utpClose(this); // ...now that all the torrents have been closed, any remaining // `&event=stopped` announce messages are queued in the announcer. // Tell the announcer to start shutdown, which sends out the stop @@ -1284,6 +1283,7 @@ void tr_session::closeImplPart2(std::promise* closed_promise, std::chrono: stats().saveIfDirty(); peer_mgr_.reset(); + tr_utpClose(this); openFiles().closeAll(); // tada we are done! diff --git a/libtransmission/session.h b/libtransmission/session.h index d359252da..3ed42c463 100644 --- a/libtransmission/session.h +++ b/libtransmission/session.h @@ -1141,7 +1141,7 @@ public: std::unique_ptr cache = std::make_unique(torrents_, 1024 * 1024 * 2); private: - // depends-on: timer_maker_, top_bandwidth_, torrents_, web_ + // depends-on: timer_maker_, top_bandwidth_, utp_comntext, torrents_, web_ std::unique_ptr peer_mgr_; // depends-on: peer_mgr_, advertised_peer_port_, torrents_