commit
ce2ec1980b
@ -490,6 +490,9 @@ func (s *Ethereum) peerHandler(listener net.Listener) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Ethereum) Stop() {
|
func (s *Ethereum) Stop() {
|
||||||
|
// Stop eventMux first, it will close all subscriptions.
|
||||||
|
s.eventMux.Stop()
|
||||||
|
|
||||||
// Close the database
|
// Close the database
|
||||||
defer s.db.Close()
|
defer s.db.Close()
|
||||||
|
|
||||||
@ -514,7 +517,6 @@ func (s *Ethereum) Stop() {
|
|||||||
}
|
}
|
||||||
s.txPool.Stop()
|
s.txPool.Stop()
|
||||||
s.stateManager.Stop()
|
s.stateManager.Stop()
|
||||||
s.eventMux.Stop()
|
|
||||||
s.blockPool.Stop()
|
s.blockPool.Stop()
|
||||||
|
|
||||||
ethlogger.Infoln("Server stopped")
|
ethlogger.Infoln("Server stopped")
|
||||||
|
@ -26,7 +26,6 @@ type JSRE struct {
|
|||||||
pipe *ethpipe.JSPipe
|
pipe *ethpipe.JSPipe
|
||||||
|
|
||||||
events event.Subscription
|
events event.Subscription
|
||||||
quitChan chan bool
|
|
||||||
|
|
||||||
objectCb map[string][]otto.Value
|
objectCb map[string][]otto.Value
|
||||||
}
|
}
|
||||||
@ -51,7 +50,6 @@ func NewJSRE(ethereum *eth.Ethereum) *JSRE {
|
|||||||
otto.New(),
|
otto.New(),
|
||||||
ethpipe.NewJSPipe(ethereum),
|
ethpipe.NewJSPipe(ethereum),
|
||||||
nil,
|
nil,
|
||||||
make(chan bool),
|
|
||||||
make(map[string][]otto.Value),
|
make(map[string][]otto.Value),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,10 +102,6 @@ func (self *JSRE) Require(file string) error {
|
|||||||
|
|
||||||
func (self *JSRE) Stop() {
|
func (self *JSRE) Stop() {
|
||||||
self.events.Unsubscribe()
|
self.events.Unsubscribe()
|
||||||
// Kill the main loop
|
|
||||||
self.quitChan <- true
|
|
||||||
|
|
||||||
close(self.quitChan)
|
|
||||||
jsrelogger.Infoln("stopped")
|
jsrelogger.Infoln("stopped")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user