mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
If we know bigger go ahead an allocate.
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1716,6 +1716,11 @@ func (a *Account) checkForReverseEntries(reply string, checkInterest, recursed b
|
||||
|
||||
var _rs [64]string
|
||||
rs := _rs[:0]
|
||||
|
||||
if n := len(a.imports.rrMap); n > cap(rs) {
|
||||
rs = make([]string, 0, n)
|
||||
}
|
||||
|
||||
for k := range a.imports.rrMap {
|
||||
rs = append(rs, k)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user