chore(api): enhance exception handing in BaseSession

Replace `Exception` with more specific error `concurrent.futures.TimeoutError`.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/22169/head
QuantumGhost 10 months ago committed by GitHub
parent 8070681a38
commit c67bf8f520
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -194,7 +194,7 @@ class BaseSession(
if self._receiver_future:
try:
self._receiver_future.result(timeout=5.0) # Wait up to 5 seconds
except Exception:
except concurrent.futures.TimeoutError:
# If the receiver loop is still running after timeout, we'll force shutdown
pass

Loading…
Cancel
Save