diff --git a/clickhouse_driver/connection.py b/clickhouse_driver/connection.py index 9255774..7ec2aa2 100644 --- a/clickhouse_driver/connection.py +++ b/clickhouse_driver/connection.py @@ -553,6 +553,9 @@ def send_addendum(self): ) def ping(self): + if not self.socket: + return None + timeout = self.sync_request_timeout with self.timeout_setter(timeout):