🎨 进程运行结束信号

This commit is contained in:
Liang Ding 2019-05-19 11:01:36 +08:00
parent 2b50910784
commit 763e140775
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,6 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util
}()
after := time.After(5 * time.Second)
channelRet["cmd"] = "run-done"
kill := false
select {
case <-after:
@ -189,6 +188,7 @@ func RunHandler(w http.ResponseWriter, r *http.Request, channel map[string]*util
logger.Debugf("User [%s, %s] done running [id=%s, file=%s, kill=%v]", wSession.UserId, sid, rid, filePath, kill)
if nil != wsChannel {
channelRet["cmd"] = "run-done"
wsChannel.WriteJSON(&channelRet)
wsChannel.Refresh()
}