mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
chore: don't panic when set deadline error
This commit is contained in:
parent
1c7e011f87
commit
3d833ef6a8
|
@ -709,7 +709,8 @@ func (doh *dnsOverHTTPS) tlsDial(ctx context.Context, dialContext dialHandler, n
|
|||
err = conn.SetDeadline(time.Now().Add(dialTimeout))
|
||||
if err != nil {
|
||||
// Must not happen in normal circumstances.
|
||||
panic(fmt.Errorf("cannot set deadline: %w", err))
|
||||
log.Errorln("cannot set deadline: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = conn.Handshake()
|
||||
|
|
Loading…
Reference in New Issue
Block a user