Changeset 732 in code for trunk/user.go
- Timestamp:
- Dec 2, 2021, 9:53:43 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user.go
r731 r732 203 203 lastTry = time.Now() 204 204 205 uc, err := connectToUpstream( net)205 uc, err := connectToUpstream(context.TODO(), net) 206 206 if err != nil { 207 207 net.logger.Printf("failed to connect to upstream server %q: %v", net.Addr, err) … … 1016 1016 // localAddrForHost returns the local address to use when connecting to host. 1017 1017 // A nil address is returned when the OS should automatically pick one. 1018 func (u *user) localTCPAddrForHost( host string) (*net.TCPAddr, error) {1018 func (u *user) localTCPAddrForHost(ctx context.Context, host string) (*net.TCPAddr, error) { 1019 1019 upstreamUserIPs := u.srv.Config().UpstreamUserIPs 1020 1020 if len(upstreamUserIPs) == 0 { … … 1022 1022 } 1023 1023 1024 ips, err := net. LookupIP(host)1024 ips, err := net.DefaultResolver.LookupIP(ctx, "ip", host) 1025 1025 if err != nil { 1026 1026 return nil, err
Note:
See TracChangeset
for help on using the changeset viewer.