Skip to content
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
Closed

Code for setting the TCP_NODELAY option is wrong #941

rfalke opened this issue Aug 30, 2018 · 1 comment

Comments

@rfalke
Copy link

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
Closes #941. Thanks to rfalke.

Signed-off-by: Roger A. Light <[email protected]>
@ralight ralight added this to the 1.5.2 milestone Aug 30, 2018
@ralight
Copy link
Contributor

ralight commented Aug 30, 2018

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

@ralight ralight closed this as completed Aug 30, 2018
ralight added a commit that referenced this issue Nov 8, 2018
Closes #941. Thanks to rfalke.

Signed-off-by: Roger A. Light <[email protected]>
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants