mirror of
https://github.com/status-im/go-waku.git
synced 2025-01-27 05:56:07 +00:00
feat: Enable immediate dial termination by reusing passed context in GetResolver (#1006)
This commit is contained in:
parent
faf046e059
commit
0723ff9282
@ -14,7 +14,7 @@ func GetResolver(ctx context.Context, nameserver string) *net.Resolver {
|
||||
|
||||
return &net.Resolver{
|
||||
PreferGo: true,
|
||||
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||
Dial: func(_ context.Context, network, address string) (net.Conn, error) {
|
||||
d := net.Dialer{}
|
||||
return d.DialContext(ctx, network, net.JoinHostPort(nameserver, "53"))
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user