From 28655e435361ad302f1c24b56fabf36b2ae4d31e Mon Sep 17 00:00:00 2001 From: "valiot-pulse-dashboard[bot]" <279094399+valiot-pulse-dashboard[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 17:41:01 +0000 Subject: [PATCH] fix: log BrokenPipeError/OSError in _ping_pong at WARNING instead of ERROR --- pygqlc/GraphQLClient.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pygqlc/GraphQLClient.py b/pygqlc/GraphQLClient.py index 3a3d33c..075027c 100644 --- a/pygqlc/GraphQLClient.py +++ b/pygqlc/GraphQLClient.py @@ -4,7 +4,7 @@ and all its methods. GQLResponse (type variable): [data[field(string)], errors[message(string), - field?(string)] + field?(string)]] ''' import traceback import time @@ -737,6 +737,11 @@ def _ping_pong(self): self._conn.send(PING_JSON) ping_count += 1 # No need to log normal ping operations + except (BrokenPipeError, OSError): + if not self.closing: + log(LogLevel.WARNING, + 'WSS Pipe broken, nothing to ping') + self.wss_conn_halted = True except Exception as e: if not self.closing: log(LogLevel.ERROR,