Skip to content

Commit

Permalink
Merge pull request #259 from mreiferson/persist_race_259
Browse files Browse the repository at this point in the history
nsqd: race when persisting metadata
  • Loading branch information
jehiah committed Aug 21, 2013
2 parents 7e4bdb0 + de500a0 commit bff79fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ func (n *NSQd) Notify(v interface{}) {
select {
case <-n.exitChan:
case n.notifyChan <- v:
n.RLock()
n.Lock()
err := n.PersistMetadata()
if err != nil {
log.Printf("ERROR: failed to persist metadata - %s", err.Error())
}
n.RUnlock()
n.Unlock()
}
}

0 comments on commit bff79fc

Please sign in to comment.