mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
node: return account manager error later in Node.Stop
This commit is contained in:
parent
3b73e3dca3
commit
40b92cfe70
1 changed files with 6 additions and 3 deletions
|
|
@ -443,10 +443,10 @@ func (n *Node) Stop() error {
|
||||||
// unblock n.Wait
|
// unblock n.Wait
|
||||||
close(n.stop)
|
close(n.stop)
|
||||||
|
|
||||||
|
// Close the accounts manager.
|
||||||
|
var accmanError error
|
||||||
if n.accman != nil {
|
if n.accman != nil {
|
||||||
if err := n.accman.Close(); err != nil {
|
accmanError = n.accman.Close()
|
||||||
return err
|
|
||||||
}
|
|
||||||
n.accman = nil
|
n.accman = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -459,6 +459,9 @@ func (n *Node) Stop() error {
|
||||||
if len(failure.Services) > 0 {
|
if len(failure.Services) > 0 {
|
||||||
return failure
|
return failure
|
||||||
}
|
}
|
||||||
|
if accmanError != nil {
|
||||||
|
return accmanError
|
||||||
|
}
|
||||||
if keystoreErr != nil {
|
if keystoreErr != nil {
|
||||||
return keystoreErr
|
return keystoreErr
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue