mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 18:50:41 -07:00
Incorporating review comments
This commit is contained in:
@@ -2354,8 +2354,8 @@ func (s *Server) UpdateAccountClaims(a *Account, ac *jwt.AccountClaims) {
|
||||
}
|
||||
for _, i := range ac.Imports {
|
||||
// check tmpAccounts with priority
|
||||
acc := (*Account)(nil)
|
||||
err := error(nil)
|
||||
var acc *Account
|
||||
var err error
|
||||
if v, ok := s.tmpAccounts.Load(i.Account); ok {
|
||||
acc = v.(*Account)
|
||||
} else {
|
||||
|
||||
@@ -1000,13 +1000,11 @@ func (c *client) processRemoteSub(argo []byte, hasOrigin bool) (err error) {
|
||||
// When used, perform the fetch.
|
||||
staticResolver := true
|
||||
if res := srv.AccountResolver(); res != nil {
|
||||
if _, ok := res.(*MemAccResolver); ok {
|
||||
staticResolver = true
|
||||
} else {
|
||||
if _, ok := res.(*MemAccResolver); !ok {
|
||||
staticResolver = false
|
||||
}
|
||||
}
|
||||
acc := (*Account)(nil)
|
||||
var acc *Account
|
||||
if staticResolver {
|
||||
acc, _ = srv.LookupAccount(accountName)
|
||||
} else if v, ok := srv.accounts.Load(accountName); ok {
|
||||
|
||||
Reference in New Issue
Block a user