mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-04 23:13:09 +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