提交 1dc1c336 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

do not unref timer for let bug appear

上级 15144c16
......@@ -107,6 +107,11 @@ function onBrowserDead(e) {
.then(() => { // Finally
log.verbose('PuppetWebEvent', 'onBrowserDead() new browser borned')
this.isBrowserBirthing = false
this.emit('watchdog', {
data: `onBrowserDead() new browser borned`
, type: 'POISON'
})
})
}
......
......@@ -83,7 +83,7 @@ function setWatchDogTimer(timeout, feed) {
log.silly('PuppetWebWatchdog', 'setWatchDogTimer(%d, %s)', timeout, feed)
this.watchDogTimer = setTimeout(watchDogReset.bind(this, timeout, feed), timeout)
this.watchDogTimer.unref()
// this.watchDogTimer.unref()
this.watchDogTimerTime = Date.now() + timeout
// block quit, force to use quit() // this.watchDogTimer.unref() // dont block quit
}
......@@ -142,4 +142,4 @@ function monitorScan(type) {
}
}
module.exports = Watchdog
\ No newline at end of file
module.exports = Watchdog
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册