Skip to content

Commit

Permalink
remove unnecessary var
Browse files Browse the repository at this point in the history
  • Loading branch information
c3mb0 committed Jul 3, 2020
1 parent 6427456 commit 9262f72
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions niftycache.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,15 @@ func (nc *Cache) Close() {

func (nc *Cache) handleCallbacks() {
done := nc.done
leave := false
for {
select {
case <-done:
done = nil
leave = true
default:
nc.m.Lock()
if nc.callbacks.Length() == 0 {
nc.m.Unlock()
if leave {
if done == nil {
nc.wg.Done()
return
}
Expand Down

0 comments on commit 9262f72

Please sign in to comment.