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

closing already closed sockets, not invalidating socket handle, _mosquitto_socket_nonblock #649

Closed
edwin-oetelaar opened this issue Dec 8, 2017 · 1 comment

Comments

@edwin-oetelaar
Copy link

COMPAT_CLOSE(*sock);

also on lines
340
425
442
1247
1275
1293
1299

I think the _mosquitto_socket_nonblock is misleading, it closes the socket as a side-effect.

if(_mosquitto_socket_nonblock(*sock)){
	COMPAT_CLOSE(*sock); /* This is wrong, the socket is already closed by _mosquitto_socket_nonblock() call */
        continue;
ralight added a commit that referenced this issue Dec 21, 2017
Thanks to Edwin van den Oetelaar.

Bug: #649
@ralight
Copy link
Contributor

ralight commented Dec 21, 2017

Thanks for spotting this, it's not a fatal problem but nice to have fixed anyway.

@ralight ralight added this to the fixes-next milestone Dec 21, 2017
@ralight ralight closed this as completed Dec 21, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 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