fix metrics wrapper

This commit is contained in:
ginuerzh
2025-10-11 21:54:16 +08:00
parent a69a759e17
commit 1c1f092a14
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ type serverConn struct {
}
func WrapConn(service string, c net.Conn) net.Conn {
if !xmetrics.IsEnabled() || c == nil {
if c == nil {
return c
}
@@ -102,7 +102,7 @@ type packetConn struct {
}
func WrapPacketConn(service string, pc net.PacketConn) net.PacketConn {
if !xmetrics.IsEnabled() || pc == nil {
if pc == nil {
return pc
}
return &packetConn{