ciyidogan commited on
Commit
306141a
·
verified ·
1 Parent(s): a6231af

Update websocket_handler.py

Browse files
Files changed (1) hide show
  1. websocket_handler.py +3 -4
websocket_handler.py CHANGED
@@ -398,7 +398,7 @@ async def websocket_endpoint(websocket: WebSocket, session_id: str):
398
  )
399
 
400
  message_type = message.get("type")
401
- log_debug(f"📨 Received message type: {message_type}", session_id=session_id)
402
 
403
  if message_type == "audio_chunk":
404
  await handle_audio_chunk(websocket, realtime_session, message)
@@ -407,12 +407,11 @@ async def websocket_endpoint(websocket: WebSocket, session_id: str):
407
  await handle_control_message(websocket, realtime_session, message)
408
 
409
  elif message_type == "ping":
410
- # Keep-alive ping
411
  await websocket.send_json({"type": "pong"})
412
- log_debug(f"🏓 Ping-pong", session_id=session_id)
413
 
414
  except asyncio.TimeoutError:
415
- log_warning(f"⏱️ WebSocket timeout - sending ping", session_id=session_id)
416
  await websocket.send_json({"type": "ping"})
417
 
418
  except WebSocketDisconnect as e:
 
398
  )
399
 
400
  message_type = message.get("type")
401
+ # Debug log'u kaldırdık
402
 
403
  if message_type == "audio_chunk":
404
  await handle_audio_chunk(websocket, realtime_session, message)
 
407
  await handle_control_message(websocket, realtime_session, message)
408
 
409
  elif message_type == "ping":
410
+ # Keep-alive ping - log yapmadan
411
  await websocket.send_json({"type": "pong"})
 
412
 
413
  except asyncio.TimeoutError:
414
+ # Timeout log'unu da azaltalım - her timeout'ta değil
415
  await websocket.send_json({"type": "ping"})
416
 
417
  except WebSocketDisconnect as e: