Changed name to better pruning vs prune running

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2018-10-03 08:38:24 -07:00
parent 871644bc10
commit e78828ce4c

View File

@@ -52,7 +52,7 @@ type Account struct {
nae int
maxnae int
maxaettl time.Duration
prunning bool
pruning bool
}
// Import stream mapping struct
@@ -197,8 +197,8 @@ func (a *Account) addImplicitServiceImport(destination *Account, from, to string
if autoexpire {
a.nae++
si.ts = time.Now().Unix()
if a.nae > a.maxnae && !a.prunning {
a.prunning = true
if a.nae > a.maxnae && !a.pruning {
a.pruning = true
go a.pruneAutoExpireResponseMaps()
}
}
@@ -210,7 +210,7 @@ func (a *Account) addImplicitServiceImport(destination *Account, from, to string
func (a *Account) pruneAutoExpireResponseMaps() {
defer func() {
a.mu.Lock()
a.prunning = false
a.pruning = false
a.mu.Unlock()
}()