Misplaced event clear in stub.c

This commit is contained in:
Willem Toorop 2017-02-18 15:56:06 +01:00
parent cbb407ae1e
commit ba7dfbeec0
1 changed files with 2 additions and 2 deletions

View File

@ -1299,8 +1299,6 @@ stub_udp_read_cb(void *userarg)
DEBUG_STUB("%s %-35s: MSG: %p \n", STUB_DEBUG_READ,
__FUNC__, (void*)netreq);
GETDNS_CLEAR_EVENT(dnsreq->loop, &netreq->event);
read = recvfrom(netreq->fd, (void *)netreq->response,
netreq->max_udp_payload_size + 1, /* If read == max_udp_payload_size
* then all is good. If read ==
@ -1322,6 +1320,8 @@ stub_udp_read_cb(void *userarg)
upstream, netreq->response, read))
return; /* Client cookie didn't match? */
GETDNS_CLEAR_EVENT(dnsreq->loop, &netreq->event);
#ifdef USE_WINSOCK
closesocket(netreq->fd);
#else