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]
|
wsChannel := session.PlaygroundWS[sid]
|
||||||
|
|
||||||
channelRet := map[string]interface{}{}
|
channelRet := map[string]interface{}{}
|
||||||
|
|
||||||
if !result.Succ {
|
if !result.Succ {
|
||||||
if nil != wsChannel {
|
|
||||||
channelRet["cmd"] = "run-done"
|
channelRet["cmd"] = "run-done"
|
||||||
channelRet["output"] = ""
|
channelRet["output"] = ""
|
||||||
|
wsChannel.WriteJSON(&channelRet)
|
||||||
err := wsChannel.WriteJSON(&channelRet)
|
|
||||||
if nil != err {
|
|
||||||
logger.Warn(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
wsChannel.Refresh()
|
wsChannel.Refresh()
|
||||||
}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue