Ramesh-vani commited on
Commit
590ae1f
·
verified ·
1 Parent(s): cad1ab0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -298,6 +298,9 @@ async def handle_user_input(websocket, process):
298
  print(f'Received user input: {event}')
299
  try:
300
  if event["command"]["type"]=="shell":
 
 
 
301
  process_input(event["command"]["command"], process)
302
 
303
  elif event["command"]["type"]=="write":
 
298
  print(f'Received user input: {event}')
299
  try:
300
  if event["command"]["type"]=="shell":
301
+ await asyncio.sleep(0.1)
302
+ if process.returncode is not None:
303
+ break
304
  process_input(event["command"]["command"], process)
305
 
306
  elif event["command"]["type"]=="write":