Merge pull request #328 from saradickinson/bugfix/fastopen_fallback

Fix issue on macOX 10.10 where TCP fast open is detected but not impl…
This commit is contained in:
wtoorop 2017-08-22 12:05:41 +02:00 committed by GitHub
commit c570114bf6
1 changed files with 6 additions and 7 deletions

View File

@ -427,13 +427,12 @@ tcp_connect(getdns_upstream *upstream, getdns_transport_list_t transport)
endpoints.sae_dstaddrlen = upstream->addr_len; endpoints.sae_dstaddrlen = upstream->addr_len;
if (connectx(fd, &endpoints, SAE_ASSOCID_ANY, if (connectx(fd, &endpoints, SAE_ASSOCID_ANY,
CONNECT_DATA_IDEMPOTENT | CONNECT_RESUME_ON_READ_WRITE, CONNECT_DATA_IDEMPOTENT | CONNECT_RESUME_ON_READ_WRITE,
NULL, 0, NULL, NULL) == -1) { NULL, 0, NULL, NULL) == 0) {
if (errno != EINPROGRESS) { return fd;
close(fd); }
return -1; if (errno == EINPROGRESS) {
} return fd;
} }
return fd;
#else #else
(void)transport; (void)transport;
#endif #endif