mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
Update server/jetstream_cluster.go
Pre-allocate Co-authored-by: Neil <neil@nats.io>
This commit is contained in:
@@ -7419,7 +7419,7 @@ func (mset *stream) processSnapshot(snap *streamSnapshot) (e error) {
|
||||
}
|
||||
|
||||
mset.mu.RLock()
|
||||
var consumers []*consumer
|
||||
consumers := make([]*consumer, 0, len(mset.consumers))
|
||||
for _, o := range mset.consumers {
|
||||
consumers = append(consumers, o)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user