Merge pull request #3830 from nats-io/shutdown-fix

Fix for isGroupLeaderless when JS not available (due to shutdown)
This commit is contained in:
Derek Collison
2023-01-30 17:18:33 -08:00
committed by GitHub

View File

@@ -739,7 +739,7 @@ func (js *jetStream) isLeaderless() bool {
// Will respond iff we are a member and we know we have no leader.
func (js *jetStream) isGroupLeaderless(rg *raftGroup) bool {
if rg == nil {
if rg == nil || js == nil {
return false
}
js.mu.RLock()