diff --git a/pkg/core/server_client.go b/pkg/core/server_client.go index 64f1e18..31616cb 100644 --- a/pkg/core/server_client.go +++ b/pkg/core/server_client.go @@ -81,11 +81,15 @@ func (c *serverClient) Run() { if err != nil { break } - c.ConnGauge.Inc() + if c.ConnGauge != nil { + c.ConnGauge.Inc() + } go func() { c.handleStream(stream) _ = stream.Close() - c.ConnGauge.Dec() + if c.ConnGauge != nil { + c.ConnGauge.Dec() + } }() } }