This commit is contained in:
yumoqing 2025-09-12 12:06:15 +08:00
parent d7a51463fe
commit acc2474479

View File

@ -25,6 +25,10 @@ class XtermProcessor(PythonScriptProcessor):
async for msg in ws:
if msg.type == aiohttp.WSMsgType.TEXT:
data = DictObject(**json.loads(msg.data))
if data.type == 'close':
debug(f'accept client close request, close the ws')
self.running = False
return
if data.type == 'input':
self.p_obj.stdin.write(data.data)
elif data.type == 'heartbeat':