Don't ignore disconnects when they happen during data transfer, instead properly disconnect the client
This commit is contained in:
		
							parent
							
								
									659bc0e177
								
							
						
					
					
						commit
						24fce94766
					
				| 
						 | 
				
			
			@ -99,10 +99,7 @@ class Context:
 | 
			
		|||
async def send_msgs(websocket, msgs):
 | 
			
		||||
    if not websocket or not websocket.open or websocket.closed:
 | 
			
		||||
        return
 | 
			
		||||
    try:
 | 
			
		||||
    await websocket.send(json.dumps(msgs))
 | 
			
		||||
    except websockets.ConnectionClosed:
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
def broadcast_all(ctx : Context, msgs):
 | 
			
		||||
    for client in ctx.clients:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue