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,