Remove uv_cancel for DNS requests.

This commit is contained in:
XMRig 2019-03-27 17:22:04 +07:00
parent ba910a46ba
commit d7795ca990
2 changed files with 3 additions and 13 deletions

View file

@ -37,7 +37,8 @@ namespace xmrig {
xmrig::Dns::Dns(IDnsListener *listener) : xmrig::Dns::Dns(IDnsListener *listener) :
m_hints(), m_hints(),
m_listener(listener), m_listener(listener),
m_status(0) m_status(0),
m_resolver(nullptr)
{ {
m_key = m_storage.add(this); m_key = m_storage.add(this);
@ -54,7 +55,7 @@ xmrig::Dns::~Dns()
{ {
m_storage.release(m_key); m_storage.release(m_key);
Handle::close(m_resolver); delete m_resolver;
} }

View file

@ -76,17 +76,6 @@ inline void Handle::close(uv_signal_t *handle)
} }
template<>
inline void Handle::close(uv_getaddrinfo_t *handle)
{
if (handle) {
uv_cancel(reinterpret_cast<uv_req_t *>(handle));
delete handle;
}
}
template<> template<>
inline void Handle::close(uv_fs_event_t *handle) inline void Handle::close(uv_fs_event_t *handle)
{ {