Ramesh-vani commited on
Commit
f517da1
·
verified ·
1 Parent(s): 3c85e65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -546,8 +546,11 @@ async def handle_user_input(websocket,key, process, connected):
546
  }
547
  websockets.broadcast(connected, json.dumps(event))
548
  elif event["command"]["type"]=="keep-alive":
549
- pass
550
-
 
 
 
551
  else:
552
  # First player starts a new game.
553
  pass
@@ -570,6 +573,7 @@ def process_input(user_input, process):
570
  #process.stdin.flush()
571
  except Exception as e:
572
  # print(f"Error writing to process stdin: {str(e)}")
 
573
  else:
574
  # print("No process available to write to.")
575
  pass
 
546
  }
547
  websockets.broadcast(connected, json.dumps(event))
548
  elif event["command"]["type"]=="keep-alive":
549
+ event = {
550
+ "type": "keep-alive",
551
+
552
+ }
553
+ websockets.broadcast(connected, json.dumps(event))
554
  else:
555
  # First player starts a new game.
556
  pass
 
573
  #process.stdin.flush()
574
  except Exception as e:
575
  # print(f"Error writing to process stdin: {str(e)}")
576
+ pass
577
  else:
578
  # print("No process available to write to.")
579
  pass