fix:完善守护机制

This commit is contained in:
Mmx
2021-07-11 13:53:23 +08:00
parent 17748b88a0
commit 5a0137c6cd
2 changed files with 8 additions and 1 deletions

View File

@@ -65,7 +65,7 @@ func ErrHandler(err error) {
func NetDailEr() func(ctx context.Context, network, address string) (net.Conn, error) {
return func(ctx context.Context, network, address string) (net.Conn, error) {
d := net.Dialer{
Timeout: 5 * time.Second,
Deadline: time.Now().Add(5 * time.Second),
}
return d.DialContext(ctx, "udp", global.Config.Settings.Dns+":53")
}