fixes a nil panic on jsz

Appears what happens is that the getPublicConsumers()
is called which produces a list of consumers and that
between the time the list is made and the Info() is
called the ephemeral was removed.

Signed-off-by: R.I.Pienaar <rip@devco.net>
This commit is contained in:
R.I.Pienaar
2021-12-13 11:51:33 +01:00
parent 628251d11d
commit 1146e66f30

View File

@@ -2474,6 +2474,10 @@ func (s *Server) accountDetail(jsa *jsAccount, optStreams, optConsumers, optCfg
if optConsumers {
for _, consumer := range stream.getPublicConsumers() {
cInfo := consumer.info()
if cInfo == nil {
continue
}
if !optCfg {
cInfo.Config = nil
}