Fix deadlock if NATS is not configured

This commit is contained in:
2025-12-17 07:03:01 +01:00
parent 88dc5036b3
commit 4ecc050c4c
2 changed files with 6 additions and 1 deletions

View File

@@ -23,6 +23,11 @@ func ReceiveNats(ms *MemoryStore,
) error {
nc := nats.GetClient()
if nc == nil {
cclog.Warn("NATS client not initialized")
return nil
}
var wg sync.WaitGroup
msgs := make(chan []byte, workers*2)