mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 18:38:42 +00:00
fix: tear down utp _after_ peer-mgr (#4383)
This commit is contained in:
@@ -1248,7 +1248,6 @@ void tr_session::closeImplPart1(std::promise<void>* closed_promise, std::chrono:
|
|||||||
tr_torrentFreeInSessionThread(tor);
|
tr_torrentFreeInSessionThread(tor);
|
||||||
}
|
}
|
||||||
torrents.clear();
|
torrents.clear();
|
||||||
tr_utpClose(this);
|
|
||||||
// ...now that all the torrents have been closed, any remaining
|
// ...now that all the torrents have been closed, any remaining
|
||||||
// `&event=stopped` announce messages are queued in the announcer.
|
// `&event=stopped` announce messages are queued in the announcer.
|
||||||
// Tell the announcer to start shutdown, which sends out the stop
|
// Tell the announcer to start shutdown, which sends out the stop
|
||||||
@@ -1284,6 +1283,7 @@ void tr_session::closeImplPart2(std::promise<void>* closed_promise, std::chrono:
|
|||||||
|
|
||||||
stats().saveIfDirty();
|
stats().saveIfDirty();
|
||||||
peer_mgr_.reset();
|
peer_mgr_.reset();
|
||||||
|
tr_utpClose(this);
|
||||||
openFiles().closeAll();
|
openFiles().closeAll();
|
||||||
|
|
||||||
// tada we are done!
|
// tada we are done!
|
||||||
|
|||||||
@@ -1141,7 +1141,7 @@ public:
|
|||||||
std::unique_ptr<Cache> cache = std::make_unique<Cache>(torrents_, 1024 * 1024 * 2);
|
std::unique_ptr<Cache> cache = std::make_unique<Cache>(torrents_, 1024 * 1024 * 2);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// depends-on: timer_maker_, top_bandwidth_, torrents_, web_
|
// depends-on: timer_maker_, top_bandwidth_, utp_comntext, torrents_, web_
|
||||||
std::unique_ptr<struct tr_peerMgr, void (*)(struct tr_peerMgr*)> peer_mgr_;
|
std::unique_ptr<struct tr_peerMgr, void (*)(struct tr_peerMgr*)> peer_mgr_;
|
||||||
|
|
||||||
// depends-on: peer_mgr_, advertised_peer_port_, torrents_
|
// depends-on: peer_mgr_, advertised_peer_port_, torrents_
|
||||||
|
|||||||
Reference in New Issue
Block a user