1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 23:37:59 +00:00

Manually abort lookup on class destruction

Some lookup might take longer so instead of waiting them, we abort them
manually.
This commit is contained in:
Chocobo1 2020-01-29 12:39:07 +08:00
parent 86e3d0d816
commit a2ebd77eac
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -52,6 +52,9 @@ ReverseResolution::ReverseResolution(QObject *parent)
ReverseResolution::~ReverseResolution()
{
// abort on-going lookups instead of waiting them
for (auto iter = m_lookups.cbegin(); iter != m_lookups.cend(); ++iter)
QHostInfo::abortHostLookup(iter.key());
}
void ReverseResolution::resolve(const QHostAddress &ip)