Commit ce2ec198 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #166 from fjl/fix/mist-quit

Fix Mist Shutdown
parents f05d422a e252dbf9
......@@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) {
}
func (s *Ethereum) Stop() {
// Stop eventMux first, it will close all subscriptions.
s.eventMux.Stop()
// Close the database
defer s.db.Close()
......@@ -514,7 +517,6 @@ func (s *Ethereum) Stop() {
}
s.txPool.Stop()
s.stateManager.Stop()
s.eventMux.Stop()
s.blockPool.Stop()
ethlogger.Infoln("Server stopped")
......
......@@ -25,8 +25,7 @@ type JSRE struct {
Vm *otto.Otto
pipe *ethpipe.JSPipe
events event.Subscription
quitChan chan bool
events event.Subscription
objectCb map[string][]otto.Value
}
......@@ -51,7 +50,6 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
otto.New(),
ethpipe.NewJSPipe(ethereum),
nil,
make(chan bool),
make(map[string][]otto.Value),
}
......@@ -104,10 +102,6 @@ func (self *JSRE) Require(file string) error {
func (self *JSRE) Stop() {
self.events.Unsubscribe()
// Kill the main loop
self.quitChan <- true
close(self.quitChan)
jsrelogger.Infoln("stopped")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment