Tunnel/Dokodemo: Fix stats conn unwrap (#5440)

Fixes https://github.com/XTLS/Xray-core/issues/5439
This commit is contained in:
风扇滑翔翼
2025-12-23 17:44:54 +08:00
committed by GitHub
parent a6792dda69
commit fa64775f07
8 changed files with 18 additions and 26 deletions
+1 -4
View File
@@ -229,10 +229,7 @@ func (h *Handler) Process(ctx context.Context, network net.Network, connection s
return errors.New("unable to set read deadline").Base(err).AtWarning()
}
iConn := connection
if statConn, ok := iConn.(*stat.CounterConnection); ok {
iConn = statConn.Connection
}
iConn := stat.TryUnwrapStatsConn(connection)
_, isDrain := iConn.(*net.TCPConn)
if !isDrain {
_, isDrain = iConn.(*net.UnixConn)