accounts: release the mutex during signing

This commit is contained in:
Péter Szilágyi 2015-12-01 13:22:18 +02:00
parent f801ec78ce
commit 103a518b3d

View file

@ -78,8 +78,8 @@ func (am *Manager) DeleteAccount(address common.Address, auth string) error {
func (am *Manager) Sign(a Account, toSign []byte) (signature []byte, err error) { func (am *Manager) Sign(a Account, toSign []byte) (signature []byte, err error) {
am.mutex.RLock() am.mutex.RLock()
defer am.mutex.RUnlock()
unlockedKey, found := am.unlocked[a.Address] unlockedKey, found := am.unlocked[a.Address]
am.mutex.RUnlock()
if !found { if !found {
return nil, ErrLocked return nil, ErrLocked
} }