bugfix
This commit is contained in:
parent
e1318d954e
commit
201321d665
@ -29,7 +29,7 @@ class XtermProcessor(PythonScriptProcessor):
|
|||||||
debug(f'accept client close request, close the ws')
|
debug(f'accept client close request, close the ws')
|
||||||
self.running = False
|
self.running = False
|
||||||
return
|
return
|
||||||
if data.type == 'input':
|
if data.type == 'input' and not self.noinput:
|
||||||
self.p_obj.stdin.write(data.data)
|
self.p_obj.stdin.write(data.data)
|
||||||
elif data.type == 'heartbeat':
|
elif data.type == 'heartbeat':
|
||||||
await self.ws_send_heartbeat(ws)
|
await self.ws_send_heartbeat(ws)
|
||||||
@ -64,10 +64,13 @@ class XtermProcessor(PythonScriptProcessor):
|
|||||||
# it must return a DictObject with sshnode information
|
# it must return a DictObject with sshnode information
|
||||||
# parameters: nodeid
|
# parameters: nodeid
|
||||||
#
|
#
|
||||||
|
self.noinput = False
|
||||||
await self.set_run_env(request, params=params)
|
await self.set_run_env(request, params=params)
|
||||||
login_info = await super().path_call(request, params=params)
|
login_info = await super().path_call(request, params=params)
|
||||||
if login_info is None:
|
if login_info is None:
|
||||||
raise Exception('data error')
|
raise Exception('data error')
|
||||||
|
if login_info.noinput:
|
||||||
|
self.noinput = True
|
||||||
|
|
||||||
# debug(f'{login_info=}')
|
# debug(f'{login_info=}')
|
||||||
ws = web.WebSocketResponse()
|
ws = web.WebSocketResponse()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user