Prevent duplicate waddrmgr lock error.

Fixes #270.
This commit is contained in:
Josh Rickmar 2015-05-13 16:34:26 -04:00
parent 49210dcf97
commit 472d6b0c1e

View file

@ -611,12 +611,14 @@ out:
// Select statement fell through by an explicit lock or the // Select statement fell through by an explicit lock or the
// timer expiring. Lock the manager here. // timer expiring. Lock the manager here.
timeout = nil if timeout != nil {
err := w.Manager.Lock() timeout = nil
if err != nil { err := w.Manager.Lock()
log.Errorf("Could not lock wallet: %v", err) if err != nil {
} else { log.Errorf("Could not lock wallet: %v", err)
w.notifyLockStateChange(true) } else {
w.notifyLockStateChange(true)
}
} }
} }
w.wg.Done() w.wg.Done()