From 731f2229c0b41ee32b34c74170b5f890b387883e Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Tue, 8 Oct 2024 10:42:55 +0300 Subject: [PATCH] [#10] health: Drop unused Signed-off-by: Dmitrii Stepanov --- health.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/health.go b/health.go index da60f75..a18e6d7 100644 --- a/health.go +++ b/health.go @@ -5,7 +5,6 @@ import ( "sync" "github.com/vishvananda/netlink" - "github.com/vishvananda/netns" "golang.org/x/sys/unix" ) @@ -27,11 +26,6 @@ func NewNetlinkWatcher(d Multidialer) *NetlinkWatcher { } func (w *NetlinkWatcher) Start() error { - ns, err := netns.Get() - if err != nil { - return err - } - if err := netlink.LinkSubscribe(w.linkUpdates, w.done); err != nil { return err } @@ -41,11 +35,11 @@ func (w *NetlinkWatcher) Start() error { } w.wg.Add(1) - go w.watch(ns) + go w.watch() return nil } -func (w *NetlinkWatcher) watch(ns netns.NsHandle) { +func (w *NetlinkWatcher) watch() { defer w.wg.Done() for {