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: no deadline support for net.Dial*, Resolve*, Lookup*, etc #6340

Closed
niemeyer opened this issue Sep 6, 2013 · 7 comments
Closed

net: no deadline support for net.Dial*, Resolve*, Lookup*, etc #6340

niemeyer opened this issue Sep 6, 2013 · 7 comments
Milestone

Comments

@niemeyer
Copy link
Contributor

@niemeyer niemeyer commented Sep 6, 2013

The deadline support introduced in the net package is currently restricted to dialing
(network, address string) via net.DialTimeout or Dialer, or to already established
connections. It would be valuable to have more functionality covered.

The specific use case at hand when this was missed was with ResolveTCPAddr and DialTCP.
It's not possible to timeout the resolution, and once an address is obtained, the only
way to dial with a timeout is by stringifying the address again and submitting into
DialTimeout or Dialer for re-parsing.
@niemeyer

This comment has been minimized.

Copy link
Contributor Author

@niemeyer niemeyer commented Sep 6, 2013

@niemeyer

This comment has been minimized.

Copy link
Contributor Author

@niemeyer niemeyer commented Sep 6, 2013

Comment 2:

Labels changed: added go1.3maybe, removed priority-triage.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 4:

Labels changed: added release-none, removed go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

@rsc rsc commented Dec 4, 2013

Comment 5:

Labels changed: added repo-main.

@niemeyer

This comment has been minimized.

Copy link
Contributor Author

@niemeyer niemeyer commented Jul 8, 2014

Comment 6:

Was just hit by this issue again:
    https://jira.mongodb.org/browse/MGO-34
Temporary hack:
    https://gist.github.com/niemeyer/f39e67dc12341a13705a
@LionNatsu

This comment has been minimized.

Copy link
Contributor

@LionNatsu LionNatsu commented Feb 5, 2017

Maybe close this?

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Feb 5, 2017

Thanks. Yeah, this was fixed in Go 1.8:

pkg net, method (*Resolver) LookupAddr(context.Context, string) ([]string, error)
pkg net, method (*Resolver) LookupCNAME(context.Context, string) (string, error)
pkg net, method (*Resolver) LookupHost(context.Context, string) ([]string, error)
pkg net, method (*Resolver) LookupIPAddr(context.Context, string) ([]IPAddr, error)
pkg net, method (*Resolver) LookupMX(context.Context, string) ([]*MX, error)
pkg net, method (*Resolver) LookupNS(context.Context, string) ([]*NS, error)
pkg net, method (*Resolver) LookupPort(context.Context, string, string) (int, error)
pkg net, method (*Resolver) LookupSRV(context.Context, string, string, string) (string, []*SRV, error)
pkg net, method (*Resolver) LookupTXT(context.Context, string) ([]string, error)
pkg net, type Dialer struct, Resolver *Resolver
pkg net, type Resolver struct
pkg net, type Resolver struct, PreferGo bool
pkg net, var DefaultResolver *Resolver
@bradfitz bradfitz closed this Feb 5, 2017
@golang golang locked and limited conversation to collaborators Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.