mirror of https://github.com/getdnsapi/getdns.git
No TCP sendto without TCP_FASTOPEN
This commit is contained in:
parent
9c01968048
commit
a6ec2b2449
|
@ -760,10 +760,7 @@ stub_tcp_write(int fd, getdns_tcp_state *tcp, getdns_network_req *netreq)
|
||||||
if (written == -1 && _getdns_socketerror() == _getdns_EISCONN)
|
if (written == -1 && _getdns_socketerror() == _getdns_EISCONN)
|
||||||
written = write(fd, netreq->query - 2, pkt_len + 2);
|
written = write(fd, netreq->query - 2, pkt_len + 2);
|
||||||
#else
|
#else
|
||||||
written = sendto(fd, (const char *)(netreq->query - 2),
|
written = write(fd, netreq->query - 2, pkt_len + 2);
|
||||||
pkt_len + 2, 0,
|
|
||||||
(struct sockaddr *)&(netreq->upstream->addr),
|
|
||||||
netreq->upstream->addr_len);
|
|
||||||
#endif
|
#endif
|
||||||
if ((written == -1 && _getdns_socketerror_wants_retry()) ||
|
if ((written == -1 && _getdns_socketerror_wants_retry()) ||
|
||||||
(size_t)written < pkt_len + 2) {
|
(size_t)written < pkt_len + 2) {
|
||||||
|
|
Loading…
Reference in New Issue