From 7cf00c8ef7b73cffadeb6f5ac414f9d252d8aa17 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Fri, 19 May 2023 12:16:24 -0600 Subject: [PATCH] Updates based on PR code review Signed-off-by: Ivan Kozlovic --- server/reload.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/server/reload.go b/server/reload.go index deae50be..0f18fce7 100644 --- a/server/reload.go +++ b/server/reload.go @@ -2122,16 +2122,12 @@ func (s *Server) reloadClusterPermissions(oldPerms *RoutePermissions) { if canImportNow { // If we could not before, then will need to send a SUB protocol. if !couldImportThen { - list := subsNeedSUB[route] - list = append(list, sub) - subsNeedSUB[route] = list + subsNeedSUB[route] = append(subsNeedSUB[route], sub) } } else if couldImportThen { // We were previously able to import this sub, but now // we can't so we need to send an UNSUB protocol - list := subsNeedUNSUB[route] - list = append(list, sub) - subsNeedUNSUB[route] = list + subsNeedUNSUB[route] = append(subsNeedUNSUB[route], sub) } } deleteRoutedSubs = deleteRoutedSubs[:0]