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

Fix for unclosed/leaking sockets from issue #358 #801

Merged
merged 1 commit into from Sep 22, 2016

Conversation

kg6hum
Copy link
Contributor

@kg6hum kg6hum commented Sep 19, 2016

The issue was server->sock not being set unless the connection was successful. In the case of SSL connections, a connection could be established but not be successful because it wasn't an SSL port or the SSL certificate did not validate. In those cases irc_server_close_connection() was called, but it was checking for server->sock != -1 before calling gnutls_bye() or close(). Since close() was never called for the socket, it would get stuck in the CLOSE_WAIT state until weechat was closed.

This will also fix issue #573 when the unclosed sockets exceed the fd limit.

@Zarthus
Copy link
Contributor

Zarthus commented Sep 19, 2016

I hope @flashcode is willing to merge this before 1.6's release, it's been affecting a lot of people.

Thanks for figuring out what was causing it!

@flashcode flashcode added the bug Unexpected problem or unintended behavior label Sep 22, 2016
@flashcode flashcode added this to the 1.6 milestone Sep 22, 2016
@flashcode flashcode self-assigned this Sep 22, 2016
@flashcode flashcode merged commit cb382a0 into weechat:master Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants