mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dd3b92b3c |
10
expander.c
10
expander.c
@@ -1035,7 +1035,7 @@ bgpq_expand(struct bgpq_expander *b)
|
||||
struct addrinfo hints, *res = NULL, *rp;
|
||||
struct linger sl;
|
||||
struct asn_entry *asne;
|
||||
int fd = -1, err, ret, aquery = 0, nodelay = 0;
|
||||
int fd = -1, err, ret, aquery = 0, nodelay = 1;
|
||||
int slen;
|
||||
|
||||
sl.l_onoff = 1;
|
||||
@@ -1076,19 +1076,11 @@ bgpq_expand(struct bgpq_expander *b)
|
||||
continue;
|
||||
}
|
||||
|
||||
socklen_t len = sizeof(nodelay);
|
||||
getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, &len);
|
||||
SX_DEBUG(debug_expander, "TCP_NODELAY set to %i\n", nodelay);
|
||||
|
||||
nodelay = 0;
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay,
|
||||
sizeof(nodelay)) == -1)
|
||||
SX_DEBUG(debug_expander, "Unable to set TCP_NODELAY on"
|
||||
" socket: %s\n", strerror(errno));
|
||||
|
||||
getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, &len);
|
||||
SX_DEBUG(debug_expander, "TCP_NODELAY set to %i\n", nodelay);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user