Release 1.14

This commit is contained in:
Job Snijders
2024-05-14 12:55:45 +00:00
parent a97f7eb4ff
commit 4fe2500b45
3 changed files with 12 additions and 4 deletions

View File

@@ -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()

View File

@@ -1 +1 @@
1.13
1.14

View File

@@ -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;
}