From 9abecac342287812d5ec791b5650942af0471b29 Mon Sep 17 00:00:00 2001 From: cedi <cedi@users.noreply.github.com> Date: Tue, 20 Nov 2018 15:53:58 +0100 Subject: [PATCH] fix typos and remove unlock --- protocols/netlink/netlink_reader.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/protocols/netlink/netlink_reader.go b/protocols/netlink/netlink_reader.go index 16cb3a53..ab85202b 100644 --- a/protocols/netlink/netlink_reader.go +++ b/protocols/netlink/netlink_reader.go @@ -74,9 +74,8 @@ func (nr *NetlinkReader) propagateChanges(routes []netlink.Route) { // Add given paths to clients func (nr *NetlinkReader) addPathsToClients(routes []netlink.Route) { - // If there where no routes yet, just skip this funktion. There's nothing to delete + // If there where no routes yet, just skip this function. There's nothing to add if len(routes) == 0 { - nr.mu.RUnlock() return } @@ -129,7 +128,7 @@ func (nr *NetlinkReader) addPathsToClients(routes []netlink.Route) { func (nr *NetlinkReader) removePathsFromClients(routes []netlink.Route) { nr.mu.RLock() - // If there where no routes yet, just skip this funktion. There's nothing to delete + // If there where no routes yet, just skip this function. There's nothing to delete if len(nr.routes) == 0 { nr.mu.RUnlock() return -- GitLab