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

Close TCPConnection on failure #2342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gedaiu
Copy link
Contributor

@gedaiu gedaiu commented Aug 5, 2019

I'm not sure if this is the best fix, but it looks like the TCPConnection state is connected after it fails to connect here: m_conn = connectTCP(proxyAddr, m_settings.networkInterface);

@s-ludwig
Copy link
Member

There is a try-catch around the TLS stream construction, which seems to be the only place in the upper part of the function that can throw. It should be sufficient to put the additions into the closure at the bottom. scope (failure) is a bit problematic, though, because unfortunately it catches any Throwable as opposed to just Exception, so using an eplicit try-catch would be better here.

@gedaiu
Copy link
Contributor Author

gedaiu commented Aug 26, 2019

I found this issue on http connections, where there was no tls context. As I remember, the exception that I got was from vibe-core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants