mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #1393 from nats-io/internal_client_reload
Move reset of internal client to after the account sublist was moved.
This commit is contained in:
@@ -1106,8 +1106,17 @@ func (s *Server) reloadAuthorization() {
|
||||
for _, route := range s.routes {
|
||||
routes = append(routes, route)
|
||||
}
|
||||
var resetCh chan struct{}
|
||||
if s.sys != nil {
|
||||
// can't hold the lock as go routine reading it may be waiting for lock as well
|
||||
resetCh = s.sys.resetCh
|
||||
}
|
||||
s.mu.Unlock()
|
||||
|
||||
if resetCh != nil {
|
||||
resetCh <- struct{}{}
|
||||
}
|
||||
|
||||
// Close clients that have moved accounts
|
||||
for _, client := range cclients {
|
||||
client.closeConnection(ClientClosed)
|
||||
|
||||
@@ -515,8 +515,6 @@ func (s *Server) configureAccounts() error {
|
||||
s.mu.Unlock()
|
||||
// acquires server lock separately
|
||||
s.addSystemAccountExports(acc)
|
||||
// can't hold the lock as go routine reading it may be waiting for lock as well
|
||||
s.sys.resetCh <- struct{}{}
|
||||
s.mu.Lock()
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user