mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
fixing crash when disabling already shut down client
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -288,6 +288,10 @@ func (s *Server) DisableJetStream() error {
|
||||
if s.JetStreamIsClustered() {
|
||||
isLeader := s.JetStreamIsLeader()
|
||||
js, cc := s.getJetStreamCluster()
|
||||
if js == nil {
|
||||
s.shutdownJetStream()
|
||||
return nil
|
||||
}
|
||||
js.mu.RLock()
|
||||
meta := cc.meta
|
||||
js.mu.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user