mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Use system account when nil
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -6,6 +6,12 @@ import (
|
||||
)
|
||||
|
||||
func (s *Server) publishAdvisory(acc *Account, subject string, adv interface{}) {
|
||||
if acc == nil {
|
||||
acc = s.SystemAccount()
|
||||
if acc == nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
ej, err := json.Marshal(adv)
|
||||
if err == nil {
|
||||
err = s.sendInternalAccountMsg(acc, subject, ej)
|
||||
|
||||
Reference in New Issue
Block a user