diff --git a/accounts/keystore/keystore.go b/accounts/keystore/keystore.go index 5b55175b1f..6996575cf5 100644 --- a/accounts/keystore/keystore.go +++ b/accounts/keystore/keystore.go @@ -358,7 +358,7 @@ func (ks *KeyStore) TimedUnlock(a accounts.Account, passphrase string, timeout t close(u.abort) } if timeout > 0 { - u = &unlocked{Key: key, abort: make(chan struct{})} + u = &unlocked{Key: key, abort: make(chan struct{}, 1)} go ks.expire(a.Address, u, timeout) } else { u = &unlocked{Key: key} diff --git a/accounts/keystore/watch.go b/accounts/keystore/watch.go index d6ef53327d..36b1bc925e 100644 --- a/accounts/keystore/watch.go +++ b/accounts/keystore/watch.go @@ -37,7 +37,7 @@ func newWatcher(ac *accountCache) *watcher { return &watcher{ ac: ac, ev: make(chan notify.EventInfo, 10), - quit: make(chan struct{}), + quit: make(chan struct{}, 1), } }