Increase anchor fetch timeout in tas_doc_read()

tas_doc_read() uses a very short 50 msec network read timeout which makes
fetching trust anchors pretty much impossible on high-latency connections
like 3G.

Use a 2 second read timeout, just like the other tas_read_cb() callback
setter does.
This commit is contained in:
Maciej S. Szmigiero 2019-03-24 00:40:19 +01:00
parent 82b9f5781e
commit 99e32f1e46
No known key found for this signature in database
GPG Key ID: 52B1D6E951D0CE07
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ static void tas_doc_read(getdns_context *context, tas_connection *a)
a->tcp.read_pos = a->tcp.read_buf; a->tcp.read_pos = a->tcp.read_buf;
a->tcp.to_read = sizeof(context->tas_hdr_spc); a->tcp.to_read = sizeof(context->tas_hdr_spc);
} }
GETDNS_SCHEDULE_EVENT(a->loop, a->fd, 50, GETDNS_SCHEDULE_EVENT(a->loop, a->fd, 2000,
getdns_eventloop_event_init(&a->event, a->req->owner, getdns_eventloop_event_init(&a->event, a->req->owner,
tas_read_cb, NULL, tas_reconnect_cb)); tas_read_cb, NULL, tas_reconnect_cb));
return; return;