wallet: unblock Lock() when the wallet is shutdown #30

Merged
roylee17 merged 1 commit from roylee/unblock-lock-when-wallet-is-shutdown into master 2022-09-17 22:39:19 +02:00
Showing only changes of commit d34ca5c59d - Show all commits

View file

@ -1379,7 +1379,10 @@ func (w *Wallet) Unlock(passphrase []byte, lock <-chan time.Time) error {
// Lock locks the wallet's address manager.
func (w *Wallet) Lock() {
w.lockRequests <- struct{}{}
select {
case <-w.quitChan():
case w.lockRequests <- struct{}{}:
}
}
// Locked returns whether the account manager for a wallet is locked.