Fix incorrect call to setsockopt() for TCP_NODELAY.

Closes #941. Thanks to rfalke.

Signed-off-by: Roger A. Light <roger@atchoo.org>
pull/1600/head
Roger A. Light 7 years ago
parent 135ff1dd2e
commit ebdfe0e6f5

@ -3,6 +3,7 @@
Broker:
- Fix build when using WITH_ADNS=yes.
- Fix incorrect call to setsockopt() for TCP_NODELAY. Closes #941.
1.5.1 - 20180816

@ -121,7 +121,7 @@ int net__socket_accept(struct mosquitto_db *db, mosq_sock_t listensock)
if(db->config->set_tcp_nodelay){
int flag = 1;
if(setsockopt(new_sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int) != 0)){
if(setsockopt(new_sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)) != 0){
log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Unable to set TCP_NODELAY.");
}
}

Loading…
Cancel
Save