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
// timer expiring. Lock the manager here.
timeout = nil
err := w.Manager.Lock()
if err != nil {
log.Errorf("Could not lock wallet: %v", err)
} else {
w.notifyLockStateChange(true)
if timeout != nil {
timeout = nil
err := w.Manager.Lock()
if err != nil {
log.Errorf("Could not lock wallet: %v", err)
} else {
w.notifyLockStateChange(true)
}
}
}
w.wg.Done()