From 99535e39d68a3439177d8707a28da2cb33bc21ab Mon Sep 17 00:00:00 2001 From: Andrew Martinez Date: Tue, 23 Mar 2021 14:33:00 -0400 Subject: [PATCH] remove unnecessary remove handler call, was causing panics --- router/router.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/router/router.go b/router/router.go index 8093f6ec2..8b13e9328 100644 --- a/router/router.go +++ b/router/router.go @@ -40,7 +40,6 @@ import ( "github.com/openziti/foundation/channel2" "github.com/openziti/foundation/common" "github.com/openziti/foundation/event" - "github.com/openziti/foundation/events" "github.com/openziti/foundation/metrics" "github.com/openziti/foundation/profiler" "github.com/openziti/foundation/util/concurrenz" @@ -147,10 +146,6 @@ func (self *Router) Start() error { func (self *Router) Shutdown() error { var errors []error if self.isShutdown.CompareAndSwap(false, true) { - if self.metricsReporter != nil { - events.RemoveMetricsEventHandler(self.metricsReporter) - } - if err := self.ctrl.Close(); err != nil { errors = append(errors, err) }