fix metrics wrapper
This commit is contained in:
1 parent
a69a759e17
commit
1c1f092a14
2 files changed
+3
-3
No files matched your search
@@ -184,7 +184,7 @@ func (h *tunnelHandler) createEntrypointService(addr string, ingress ingress.Ing
|
||||
"kind": "service",
|
||||
})
|
||||
epListener := newTCPListener(ln,
|
||||
listener.AddrOption(h.md.entryPoint),
|
||||
listener.AddrOption(addr),
|
||||
listener.ServiceOption(serviceName),
|
||||
listener.ProxyProtocolOption(h.md.entryPointProxyProtocol),
|
||||
listener.LoggerOption(log.WithFields(map[string]any{
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in new issue
Block a user