Browse Source

Manually abort lookup on class destruction

Some lookup might take longer so instead of waiting them, we abort them
manually.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
a2ebd77eac
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 3
      src/base/net/reverseresolution.cpp

3
src/base/net/reverseresolution.cpp

@ -52,6 +52,9 @@ ReverseResolution::ReverseResolution(QObject *parent) @@ -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)

Loading…
Cancel
Save