mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-02 13:16:47 +00:00
fix: close connection after error handling in doq
This commit is contained in:
1 parent
7d7532d49f
commit
0436650753
1 file changed
+2
@@ -339,6 +339,7 @@ func (doq *dnsOverQUIC) openConnection(ctx context.Context) (quicConn *quic.Conn
|
||||
|
||||
host, _, err := net.SplitHostPort(doq.addr)
|
||||
if err != nil {
|
||||
_ = packetConn.Close()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -354,6 +355,7 @@ func (doq *dnsOverQUIC) openConnection(ctx context.Context) (quicConn *quic.Conn
|
||||
NameCertVerify: doq.nameCertVerify,
|
||||
})
|
||||
if err != nil {
|
||||
_ = packetConn.Close()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user