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

net: add timeouts for DialTCP etc #3097

Closed
alberts opened this issue Feb 21, 2012 · 13 comments
Closed

net: add timeouts for DialTCP etc #3097

alberts opened this issue Feb 21, 2012 · 13 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Feb 21, 2012

What steps will reproduce the problem?

We want to bind to a specific local interface and dial a TCP connection with a timeout.

There's a workaround: use a goroutine, but it suffers from the same issue as the TODO in
DialTimeout at the moment:

TODO(bradfitz): the timeout should be pushed down into the net package's event loop, so
on timeout to dead hosts we don't have a goroutine sticking around for the default of ~3
minutes.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

tip

Please provide any additional information below.

https://groups.google.com/group/golang-dev/browse_thread/thread/df27a3f5e459fd70
@alberts
Copy link
Contributor Author

alberts commented Feb 21, 2012

Comment 1:

The TODO is also mentioned in issue #2631.

@rsc
Copy link
Contributor

rsc commented Feb 21, 2012

Comment 2:

After Go 1.  We'll have to make new functions (DialTimeoutTCP etc)
but so be it.  It's time to stop changing package net.

Labels changed: added priority-later, removed priority-triage.

Owner changed to builder@golang.org.

Status changed to Accepted.

@alberts
Copy link
Contributor Author

alberts commented Feb 21, 2012

Comment 3:

Sounds good. Thanks.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 4:

Labels changed: added go1.1.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-l.

@bradfitz
Copy link
Contributor

Comment 6:

What remains on this bug?
Now that we have a proper DialTimeout, adding new functions like DialTCPTimeout is
trivial (not "Size-L").  We just need to decide the API.  Actually implementing it
should be quick.

@alexbrainman
Copy link
Member

Comment 7:

This is still not implemented for plan9 and windows.

@bradfitz
Copy link
Contributor

Comment 8:

I'm not sure this bug needs to depend on plan9 and windows.  Things will still work
there, but just slightly less efficiently for now (using a goroutine), right?
This bug should be about discussing the API, not the implementation.
API proposals, anybody?

@alexbrainman
Copy link
Member

Comment 9:

Fair enough. But then issue #2631 is still unresolved for plan9 and windows. Plus there
is a small matter of less efficiency, like you said, but, I think, we should be talking
os threads here, not goroutines.
Alex

@bradfitz
Copy link
Contributor

Comment 10:

See also issue #4842 (TCP Fast Open)

@bradfitz
Copy link
Contributor

Comment 11:

Issue #4922 has been merged into this issue.

@bradfitz
Copy link
Contributor

Comment 12:

This issue was closed by revision 752fec2.

Status changed to Fixed.

@anacrolix
Copy link
Contributor

Comment 13:

Great, thanks.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

6 participants