mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Fix close handler skipped on packet handshake failure
This commit is contained in:
+3
-2
@@ -230,9 +230,10 @@ func (m *ConnectionManager) NewPacketConnection(ctx context.Context, this N.Dial
|
||||
}
|
||||
err = N.ReportPacketConnHandshakeSuccess(conn, remotePacketConn)
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
err = E.Cause(err, "report handshake success")
|
||||
remotePacketConn.Close()
|
||||
m.logger.ErrorContext(ctx, "report handshake success: ", err)
|
||||
N.CloseOnHandshakeFailure(conn, onClose, err)
|
||||
m.logger.ErrorContext(ctx, err)
|
||||
return
|
||||
}
|
||||
if destinationAddress.IsValid() {
|
||||
|
||||
Reference in New Issue
Block a user