mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Updates based on PR code review
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user