You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
empty-catch: sdks/python/pmxt/ws_client.py:132 — bare except Exception: pass during WebSocket close #1106
ws.close() failing during a connection-retry teardown is silently discarded with no logging. If the exception type or message would reveal why the socket is stuck (e.g. a TLS or OS-level resource leak), that information is permanently lost. Debugging intermittent WebSocket issues becomes much harder.
Suggested Fix
At minimum log the suppressed error at DEBUG level so it appears in traces without disrupting the retry flow:
exceptExceptionasclose_exc:
logger.debug("ws.close() failed during retry teardown", {"error": str(close_exc)})
Additional context from duplicate #1896: the same except Exception: pass wrapping ws.close() during connect-retry teardown in _ensure_connected (now at ws_client.py:159-162 after the max_attempts/reconnectInterval config changes shifted the line numbers) — also notes this can hide resource leaks (unclosed sockets/file descriptors across retries), and suggests logging the failure consistent with how close() elsewhere in this file already handles cleanup errors via logging.warning.
Activity
realfishsam commentedon Aug 18, 2026
Additional context from duplicate #1896: the same
except Exception: passwrappingws.close()during connect-retry teardown in_ensure_connected(now at ws_client.py:159-162 after themax_attempts/reconnectIntervalconfig changes shifted the line numbers) — also notes this can hide resource leaks (unclosed sockets/file descriptors across retries), and suggests logging the failure consistent with howclose()elsewhere in this file already handles cleanup errors vialogging.warning.Generated by Claude Code
except Exception: passsilently masks ws.close() failure during connect-retry cleanup #1896 as a duplicate of this issue