mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Release 1.14
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,5 +1,5 @@
|
||||
1.14
|
||||
- Set TCP_NODELAY on the whois socket
|
||||
1.14 (2024-05-14)
|
||||
- Small performance gain: set TCP_NODELAY on the socket
|
||||
|
||||
1.13 (2024-05-01)
|
||||
- Fixed a bug for Mac users by removing sx_maxsockbuf()
|
||||
|
||||
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 = 1;
|
||||
int fd = -1, err, ret, aquery = 0, nodelay = 0;
|
||||
int slen;
|
||||
|
||||
sl.l_onoff = 1;
|
||||
@@ -1076,11 +1076,19 @@ 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