瀏覽代碼

address comment

Eva Ho 1 年之前
父節點
當前提交
9657314ae2
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      app/src/index.ts

+ 3 - 4
app/src/index.ts

@@ -115,15 +115,14 @@ function server() {
     logger.error(data.toString().trim())
   })
 
-  function restart(code: number) {
-    logger.info(`Server exited with code: ${code}`)
+  function restart() {
     setTimeout(server, 3000)
   }
 
-  proc.on('exit', code => restart(code))
+  proc.on('exit', restart)
 
   app.on('before-quit', () => {
-    proc.off('exit', code => restart(code))
+    proc.off('exit', restart)
     proc.kill()
   })
 }