Skip to content

Commit

Permalink
Changed name to better pruning vs prune running
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Collison <derek@nats.io>
  • Loading branch information
derekcollison committed Oct 3, 2018
1 parent 871644b commit e78828c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Account struct {
nae int
maxnae int
maxaettl time.Duration
prunning bool
pruning bool
}

// Import stream mapping struct
Expand Down Expand Up @@ -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()
}
}
Expand All @@ -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()
}()

Expand Down

0 comments on commit e78828c

Please sign in to comment.