From 40258f6a2fd98241ecf0f4446ddcd0d73d8be3e8 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sun, 4 Dec 2022 18:45:34 +0300 Subject: [PATCH] Stop async worker at correct place --- src/base/bittorrent/sessionimpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 18644a370..b909e67a6 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -627,6 +627,8 @@ SessionImpl::~SessionImpl() // we delete lt::session delete Net::PortForwarder::instance(); + // We must stop "async worker" only after deletion + // of all the components that could potentially use it m_asyncWorker->clear(); m_asyncWorker->waitForDone();