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 nil pointer dereference panic on TCP reqs #15

Merged
merged 1 commit into from
Aug 1, 2014
Merged

Conversation

orls
Copy link
Contributor

@orls orls commented Jul 17, 2014

Calling Close() closes the tpc socket, but the underlying lib is still expecting it to be open so it can do some retry logic

We either need to call response.Hijack() early – to let the underlying lib know that we're planning on handling Close() ourselves – or we need to just let it do its thing.

I've opted to leave it up to the lib completely, so it can do it's retry stuff if that's ever useful.

Calling `Close()` closes the tpc socket, but the underlying lib is still expecting it to be open so it can [do some retry logic](https://github.com/miekg/dns/blob/5c48f3623a4b2f1465b8ccf4fe29b6eb3888ee07/server.go#L332-L356)

We either need to call `response.Hijack()` early – to let the underlying lib know that we're planning on handling `Close()` ourselves – or we need to just let it do its thing.

I've opted to leave it up to the lib completely, so it can do it's retry stuff if that's ever useful.
@tarnfeld
Copy link
Contributor

Thanks for digging into this, I think this makes sense.

:shipit:

tarnfeld added a commit that referenced this pull request Aug 1, 2014
Fix nil pointer dereference panic on TCP reqs
@tarnfeld tarnfeld merged commit 164f8ec into master Aug 1, 2014
@tarnfeld tarnfeld deleted the fix/tcp-panic branch August 1, 2014 08:44
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.

2 participants