mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-08-22 14:14:56 -04:00
fix: Clean connection for workaround http2 windows problem (#219)
This commit is contained in:
@ -149,11 +149,20 @@ void RequestHandler::cancelRequestInternal(const QString &id)
|
|||||||
QMutexLocker locker(&m_mutex);
|
QMutexLocker locker(&m_mutex);
|
||||||
if (m_activeRequests.contains(id)) {
|
if (m_activeRequests.contains(id)) {
|
||||||
QNetworkReply *reply = m_activeRequests[id];
|
QNetworkReply *reply = m_activeRequests[id];
|
||||||
|
|
||||||
|
disconnect(reply, nullptr, this, nullptr);
|
||||||
|
|
||||||
reply->abort();
|
reply->abort();
|
||||||
m_activeRequests.remove(id);
|
m_activeRequests.remove(id);
|
||||||
m_accumulatedResponses.remove(reply);
|
m_accumulatedResponses.remove(reply);
|
||||||
|
|
||||||
|
reply->deleteLater();
|
||||||
|
|
||||||
locker.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
|
m_manager->clearConnectionCache();
|
||||||
|
m_manager->clearAccessCache();
|
||||||
|
|
||||||
emit requestCancelled(id);
|
emit requestCancelled(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user