fix issue

pull/410/head
vapao 2021-08-27 14:38:59 +08:00
parent c21c5db83d
commit d90e98c016
1 changed files with 5 additions and 2 deletions

View File

@ -28,8 +28,11 @@ export default observer(function Console() {
.then(res => {
term.write(res.data)
setStep(res.step)
setStatus(res.status)
socket = _makeSocket(res.index)
if (res.status === '1') {
socket = _makeSocket(res.index)
} else {
setStatus('wait')
}
})
.finally(() => setFetching(false))
return () => socket && socket.close()