浏览代码

javascript: remove unused quit channel

This fixes the hang in JSRE.Stop.
Felix Lange 11 年之前
父节点
当前提交
8170f96ded
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      javascript/javascript_runtime.go

+ 1 - 7
javascript/javascript_runtime.go

@@ -25,8 +25,7 @@ type JSRE struct {
 	Vm       *otto.Otto
 	Vm       *otto.Otto
 	pipe     *ethpipe.JSPipe
 	pipe     *ethpipe.JSPipe
 
 
-	events   event.Subscription
-	quitChan chan bool
+	events event.Subscription
 
 
 	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")
 }
 }