This commit is contained in:
yumoqing 2025-07-15 18:33:17 +08:00
parent c7c9a3e446
commit 964f1a6482

View File

@ -70,10 +70,10 @@ class XtermProcessor(PythonScriptProcessor):
x = await self.p_obj.stdout.read(1024) x = await self.p_obj.stdout.read(1024)
await self.ws_sendstr(ws, x) await self.ws_sendstr(ws, x)
except (asyncio.CancelledError, EOFError): except (asyncio.CancelledError, EOFError):
pass pass
finally: finally:
self.p_obj.close() self.p_obj.close()
stdin_task.cancel() stdin_task.cancel()
async def ws_sendstr(self, ws:web.WebSocketResponse, s:str): async def ws_sendstr(self, ws:web.WebSocketResponse, s:str):
data = { data = {