Browse Source

Make sure ResumeSessionContext is destroyed before start processing

PR #18912.
adaptive-webui-19844
Vladimir Golovnev 2 years ago committed by GitHub
parent
commit
d83b2a6131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/base/bittorrent/sessionimpl.cpp

4
src/base/bittorrent/sessionimpl.cpp

@ -1435,7 +1435,8 @@ void SessionImpl::endStartup(ResumeSessionContext *context)
} }
context->deleteLater(); context->deleteLater();
connect(context, &QObject::destroyed, this, [this]
{
m_nativeSession->resume(); m_nativeSession->resume();
if (m_refreshEnqueued) if (m_refreshEnqueued)
m_refreshEnqueued = false; m_refreshEnqueued = false;
@ -1456,6 +1457,7 @@ void SessionImpl::endStartup(ResumeSessionContext *context)
m_isRestored = true; m_isRestored = true;
emit startupProgressUpdated(100); emit startupProgressUpdated(100);
emit restored(); emit restored();
});
} }
void SessionImpl::initializeNativeSession() void SessionImpl::initializeNativeSession()

Loading…
Cancel
Save