From 3ffb2618647e0d13bcc4446a5ac221530aec1eae Mon Sep 17 00:00:00 2001 From: Mark Backman Date: Tue, 29 Jul 2025 13:28:33 -0400 Subject: [PATCH] Remove use of on_client_closed event in foundational examples --- examples/foundational/13i-soniox-transcription.py | 4 ---- examples/foundational/26f-gemini-multimodal-live-files-api.py | 4 ---- .../26g-gemini-multimodal-live-groundingMetadata.py | 4 ---- examples/foundational/41a-text-only-webrtc.py | 4 ---- examples/foundational/41b-text-and-audio-webrtc.py | 4 ---- 5 files changed, 20 deletions(-) diff --git a/examples/foundational/13i-soniox-transcription.py b/examples/foundational/13i-soniox-transcription.py index 5bec62f28..957067284 100644 --- a/examples/foundational/13i-soniox-transcription.py +++ b/examples/foundational/13i-soniox-transcription.py @@ -64,10 +64,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() runner = PipelineRunner(handle_sigint=False) diff --git a/examples/foundational/26f-gemini-multimodal-live-files-api.py b/examples/foundational/26f-gemini-multimodal-live-files-api.py index 07b427c37..fd53fe9b6 100644 --- a/examples/foundational/26f-gemini-multimodal-live-files-api.py +++ b/examples/foundational/26f-gemini-multimodal-live-files-api.py @@ -196,10 +196,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() # Run the pipeline diff --git a/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py b/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py index b96e3ab26..e5f3aacd2 100644 --- a/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py +++ b/examples/foundational/26g-gemini-multimodal-live-groundingMetadata.py @@ -148,10 +148,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() runner = PipelineRunner(handle_sigint=False) diff --git a/examples/foundational/41a-text-only-webrtc.py b/examples/foundational/41a-text-only-webrtc.py index 2441b6380..f0a795d74 100644 --- a/examples/foundational/41a-text-only-webrtc.py +++ b/examples/foundational/41a-text-only-webrtc.py @@ -144,10 +144,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() runner = PipelineRunner(handle_sigint=False) diff --git a/examples/foundational/41b-text-and-audio-webrtc.py b/examples/foundational/41b-text-and-audio-webrtc.py index 4e8f10605..205ab57f3 100644 --- a/examples/foundational/41b-text-and-audio-webrtc.py +++ b/examples/foundational/41b-text-and-audio-webrtc.py @@ -160,10 +160,6 @@ async def run_example(transport: BaseTransport, _: argparse.Namespace, handle_si @transport.event_handler("on_client_disconnected") async def on_client_disconnected(transport, client): logger.info(f"Client disconnected") - - @transport.event_handler("on_client_closed") - async def on_client_closed(transport, client): - logger.info(f"Client closed connection") await task.cancel() runner = PipelineRunner(handle_sigint=False)