mirror of
https://github.com/openziti/ziti.git
synced 2026-10-23 04:06:50 +00:00
Merge pull request #654 from openziti/remove-double-cleanup
listener.close already cleaned up interceptor. don't need to do it again
This commit is contained in:
@@ -97,7 +97,7 @@ func (self *servicePoller) handleServiceListUpdate(lastUpdateToken []byte, servi
|
||||
}
|
||||
|
||||
// TODO: just push updates down the control channel when necessary
|
||||
func (self *servicePoller) pollServices(pollInterval time.Duration, notifyClose <-chan struct{}, closeHandler func()) {
|
||||
func (self *servicePoller) pollServices(pollInterval time.Duration, notifyClose <-chan struct{}) {
|
||||
if err := self.fabricProvider.authenticate(); err != nil {
|
||||
logrus.WithError(err).Fatal("xgress_edge_tunnel unable to authenticate to controller. " +
|
||||
"ensure tunneler mode is enabled for this router or disable tunnel listener. exiting ")
|
||||
@@ -113,7 +113,6 @@ func (self *servicePoller) pollServices(pollInterval time.Duration, notifyClose
|
||||
case <-ticker.C:
|
||||
self.requestServiceListUpdate()
|
||||
case <-notifyClose:
|
||||
closeHandler()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import (
|
||||
"github.com/openziti/fabric/router/xgress"
|
||||
cmap "github.com/orcaman/concurrent-map"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"net"
|
||||
)
|
||||
|
||||
@@ -87,11 +86,7 @@ func (self *tunneler) Start(notifyClose <-chan struct{}) error {
|
||||
self.servicePoller.serviceListener.HandleProviderReady(self.fabricProvider)
|
||||
self.interceptor.Start(self.fabricProvider)
|
||||
|
||||
go self.servicePoller.pollServices(self.listenOptions.svcPollRate, notifyClose, func() {
|
||||
logrus.Info("stopping xgress_edge_tunnel.interceptor")
|
||||
self.interceptor.Stop()
|
||||
logrus.Info("stopped xgress_edge_tunnel.interceptor")
|
||||
})
|
||||
go self.servicePoller.pollServices(self.listenOptions.svcPollRate, notifyClose)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user