Violation
(lines 130–133, inner try/except wrapping ws.close())
Location
sdks/python/pmxt/ws_client.py:132
Full context (lines 128–135):
except Exception as exc:
last_error = exc
try:
ws.close()
except Exception:
pass
if attempt < CONNECT_ATTEMPTS - 1:
time.sleep(0.25 * (attempt + 1))
Why It Matters
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:
except Exception as close_exc:
logger.debug("ws.close() failed during retry teardown", {"error": str(close_exc)})
Found by automated code hygiene audit
Violation
(lines 130–133, inner try/except wrapping
ws.close())Location
sdks/python/pmxt/ws_client.py:132Full context (lines 128–135):
Why It Matters
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:
Found by automated code hygiene audit