mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Remove uv_cancel for DNS requests.
This commit is contained in:
parent
ba910a46ba
commit
d7795ca990
2 changed files with 3 additions and 13 deletions
|
@ -37,7 +37,8 @@ namespace xmrig {
|
|||
xmrig::Dns::Dns(IDnsListener *listener) :
|
||||
m_hints(),
|
||||
m_listener(listener),
|
||||
m_status(0)
|
||||
m_status(0),
|
||||
m_resolver(nullptr)
|
||||
{
|
||||
m_key = m_storage.add(this);
|
||||
|
||||
|
@ -54,7 +55,7 @@ xmrig::Dns::~Dns()
|
|||
{
|
||||
m_storage.release(m_key);
|
||||
|
||||
Handle::close(m_resolver);
|
||||
delete m_resolver;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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<>
|
||||
inline void Handle::close(uv_fs_event_t *handle)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue