diff --git a/dialer_wrapper.go b/dialer_wrapper.go index cebaf96..33c2c4a 100644 --- a/dialer_wrapper.go +++ b/dialer_wrapper.go @@ -159,7 +159,7 @@ func (ct *clientConnTracker) Close() error { ct.event = nil } ct.mu.Unlock() - if ct.opts.monitoring { + if ct.opts.monitoring && err == nil { reportDialerConnClosed(ct.dialerName) } return err