New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code for setting the TCP_NODELAY option is wrong #941

Closed
rfalke opened this Issue Aug 30, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@rfalke

rfalke commented Aug 30, 2018

The code in the current master is:

	if(setsockopt(new_sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int) != 0)){
		log__printf(NULL, MOSQ_LOG_WARNING, "Warning: Unable to set TCP_NODELAY.");
	}

But the parentheses are set wrong which results in a call setsockopt(..., 1) which the kernel answers with EINVAL.

ralight added a commit that referenced this issue Aug 30, 2018

Fix incorrect call to setsockopt() for TCP_NODELAY.
Closes #941. Thanks to rfalke.

Signed-off-by: Roger A. Light <roger@atchoo.org>

@ralight ralight added this to the 1.5.2 milestone Aug 30, 2018

@ralight

This comment has been minimized.

Show comment
Hide comment
@ralight

ralight Aug 30, 2018

Contributor

Thank you! That's now fixed in the fixes branch.

Contributor

ralight commented Aug 30, 2018

Thank you! That's now fixed in the fixes branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment