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 {