summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LibuvEventPoll.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/LibuvEventPoll.cc b/src/LibuvEventPoll.cc
index c5b3f42d..f201615e 100644
--- a/src/LibuvEventPoll.cc
+++ b/src/LibuvEventPoll.cc
@@ -159,9 +159,10 @@ void LibuvEventPoll::poll(const struct timeval& tv)
// their API. So we call ares_process_fd for all ares_channel and
// re-register their sockets.
for (auto& r: nameResolverEntries_) {
- r->processTimeout();
- r->removeSocketEvents(this);
- r->addSocketEvents(this);
+ auto& ent = r.second;
+ ent.processTimeout();
+ ent.removeSocketEvents(this);
+ ent.addSocketEvents(this);
}
#endif // ENABLE_ASYNC_DNS