We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97b96de commit a990146Copy full SHA for a990146
src/databricks/sql/telemetry/telemetry_client.py
@@ -398,9 +398,8 @@ def close_telemetry_client(session_id_hex):
398
"""Remove the telemetry client for a specific connection"""
399
global _initialized, _executor
400
with _lock:
401
- if session_id_hex in _clients:
+ if (telemetry_client := _clients.pop(session_id_hex, None)) is not None:
402
logger.debug("Removing telemetry client for connection %s", session_id_hex)
403
- telemetry_client = _clients.pop(session_id_hex, None)
404
telemetry_client.close()
405
406
# Shutdown executor if no more clients
0 commit comments