mirror of https://github.com/getdnsapi/getdns.git
Merge branch 'develop' into hackathon/zeroconf-dnssec
This commit is contained in:
commit
f4fe2cb6c5
14
src/sync.c
14
src/sync.c
|
@ -123,18 +123,22 @@ getdns_sync_data_cleanup(getdns_sync_data *data)
|
||||||
* synchronous request.
|
* synchronous request.
|
||||||
*/
|
*/
|
||||||
GETDNS_CLEAR_EVENT(upstream->loop, &upstream->event);
|
GETDNS_CLEAR_EVENT(upstream->loop, &upstream->event);
|
||||||
|
if (upstream->conn_state != GETDNS_CONN_OPEN ||
|
||||||
|
upstream->keepalive_timeout == 0)
|
||||||
(*upstream->event.timeout_cb)(upstream->event.userarg);
|
(*upstream->event.timeout_cb)(upstream->event.userarg);
|
||||||
|
|
||||||
/* This should have cleared the event */
|
|
||||||
assert(!upstream->event.read_cb &&
|
|
||||||
!upstream->event.write_cb &&
|
|
||||||
!upstream->event.timeout_cb);
|
|
||||||
}
|
}
|
||||||
upstream->loop = data->context->extension;
|
upstream->loop = data->context->extension;
|
||||||
upstream->is_sync_loop = 0;
|
upstream->is_sync_loop = 0;
|
||||||
if (upstream->event.read_cb || upstream->event.write_cb)
|
if (upstream->event.read_cb || upstream->event.write_cb)
|
||||||
GETDNS_SCHEDULE_EVENT(upstream->loop, upstream->fd,
|
GETDNS_SCHEDULE_EVENT(upstream->loop, upstream->fd,
|
||||||
TIMEOUT_FOREVER, &upstream->event);
|
TIMEOUT_FOREVER, &upstream->event);
|
||||||
|
|
||||||
|
else if (upstream->event.timeout_cb &&
|
||||||
|
upstream->conn_state == GETDNS_CONN_OPEN &&
|
||||||
|
upstream->keepalive_timeout != 0) {
|
||||||
|
GETDNS_SCHEDULE_EVENT(upstream->loop, upstream->fd,
|
||||||
|
upstream->keepalive_timeout, &upstream->event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue