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

Fixed socket proxy crash issue caused by double closing sockets #2239

Merged
merged 4 commits into from Feb 20, 2018

Conversation

kfeinauer
Copy link
Contributor

Fixes #2061

@jmcphers
Copy link
Member

Awesome, so glad to see a fix for this!

// and can (and has) lead to segfaults
if (!closed_)
{
ptrClient_->close();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should store the closed state in the individual Socket instances instead? Then we could defend against other code paths which inadvertently double-close a Socket (rather than just the SocketProxy)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll take a look.

This reverts commit d986b9c.

Conflicts:
	src/cpp/core/http/SocketProxy.cpp
…ocket implementations so higher level protocols do not have to worry about double close
@kfeinauer
Copy link
Contributor Author

@jmcphers Updated.

@jmcphers jmcphers merged commit e6a7582 into master Feb 20, 2018
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