This commit is contained in:
parent
7deb7c60e5
commit
c24e4f4711
|
@ -80,22 +80,12 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
wsChannel := session.PlaygroundWS[sid]
|
||||
|
||||
channelRet := map[string]interface{}{}
|
||||
|
||||
if !result.Succ {
|
||||
if nil != wsChannel {
|
||||
channelRet["cmd"] = "run-done"
|
||||
channelRet["output"] = ""
|
||||
|
||||
err := wsChannel.WriteJSON(&channelRet)
|
||||
if nil != err {
|
||||
logger.Warn(err)
|
||||
return
|
||||
}
|
||||
|
||||
wsChannel.Refresh()
|
||||
}
|
||||
channelRet["cmd"] = "run-done"
|
||||
channelRet["output"] = ""
|
||||
wsChannel.WriteJSON(&channelRet)
|
||||
wsChannel.Refresh()
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue