mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fix for debugSubscribers and claims test
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -2266,8 +2266,26 @@ func (s *Server) debugSubscribers(sub *subscription, c *client, _ *Account, subj
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, acc, _, msg, err := s.getRequestInfo(c, msg)
|
var ci ClientInfo
|
||||||
if err != nil {
|
if len(hdr) > 0 {
|
||||||
|
if err := json.Unmarshal(getHeader(ClientInfoHdr, hdr), &ci); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var acc *Account
|
||||||
|
if ci.Service != _EMPTY_ {
|
||||||
|
acc, _ = s.LookupAccount(ci.Service)
|
||||||
|
} else if ci.Account != _EMPTY_ {
|
||||||
|
acc, _ = s.LookupAccount(ci.Account)
|
||||||
|
} else {
|
||||||
|
// Direct $SYS access.
|
||||||
|
acc = c.acc
|
||||||
|
if acc == nil {
|
||||||
|
acc = s.SystemAccount()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if acc == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1220,6 +1220,7 @@ func TestAccountClaimsUpdates(t *testing.T) {
|
|||||||
claimUpdateSubj := fmt.Sprintf(subj, pub)
|
claimUpdateSubj := fmt.Sprintf(subj, pub)
|
||||||
nc.Publish(claimUpdateSubj, []byte(ajwt))
|
nc.Publish(claimUpdateSubj, []byte(ajwt))
|
||||||
nc.Flush()
|
nc.Flush()
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
|
||||||
acc, _ = s.LookupAccount(pub)
|
acc, _ = s.LookupAccount(pub)
|
||||||
if acc.MaxActiveConnections() != 8 {
|
if acc.MaxActiveConnections() != 8 {
|
||||||
|
|||||||
Reference in New Issue
Block a user