From 16a8988e41e42db819a14f83e016f9f01a95ade4 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Mon, 3 Sep 2018 15:25:57 +0530 Subject: [PATCH] addressing review comments --- net/bridge.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/net/bridge.go b/net/bridge.go index a65210fa..432f3f14 100644 --- a/net/bridge.go +++ b/net/bridge.go @@ -627,12 +627,9 @@ func monitorInterface(ifaceName string, log *logrus.Logger) error { } go func() { - for { - select { - case update := <-updatesChannel: - if update.Link.Attrs().Name == ifaceName && update.IfInfomsg.Flags&syscall.IFF_UP == 0 { - log.Errorf("Interface %q which needs to be in UP state for Weave functioning is found to be in DOWN state", ifaceName) - } + for update := range updatesChannel { + if update.Link.Attrs().Name == ifaceName && update.IfInfomsg.Flags&syscall.IFF_UP == 0 { + log.Errorf("Interface %q which needs to be in UP state for Weave functioning is found to be in DOWN state", ifaceName) } } }()