mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[fixed] error print on re adding existing system import
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -1475,11 +1475,15 @@ func (s *Server) registerSystemImports(a *Account) {
|
||||
|
||||
// Add in this to the account in 2 places.
|
||||
// "$SYS.REQ.SERVER.PING.CONNZ" and "$SYS.REQ.ACCOUNT.PING.CONNZ"
|
||||
if err := a.AddServiceImport(sacc, connzSubj, mappedSubj); err != nil {
|
||||
s.Errorf("Error setting up system service imports for account: %v", err)
|
||||
if _, ok := a.imports.services[connzSubj]; !ok {
|
||||
if err := a.AddServiceImport(sacc, connzSubj, mappedSubj); err != nil {
|
||||
s.Errorf("Error setting up system service imports for account: %v", err)
|
||||
}
|
||||
}
|
||||
if err := a.AddServiceImport(sacc, accConnzReqSubj, mappedSubj); err != nil {
|
||||
s.Errorf("Error setting up system service imports for account: %v", err)
|
||||
if _, ok := a.imports.services[accConnzReqSubj]; !ok {
|
||||
if err := a.AddServiceImport(sacc, accConnzReqSubj, mappedSubj); err != nil {
|
||||
s.Errorf("Error setting up system service imports for account: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user