diff --git a/pychromecast/socket_client.py b/pychromecast/socket_client.py index 402d05a07..a4ec9ef2b 100644 --- a/pychromecast/socket_client.py +++ b/pychromecast/socket_client.py @@ -119,15 +119,6 @@ def _json_to_payload(data): return json.dumps(data, ensure_ascii=False) -def _is_ssl_timeout(exc): - """Returns True if the exception is for an SSL timeout""" - return exc.message in ( - "The handshake operation timed out", - "The write operation timed out", - "The read operation timed out", - ) - - @dataclass(frozen=True) class NetworkAddress: """Network address container.""" @@ -841,18 +832,6 @@ def _read_bytes_from_socket(self, msglen): self.port, ) continue - except ssl.SSLError as exc: - # Support older ssl implementations which does not raise - # socket.timeout on timeouts - if _is_ssl_timeout(exc): - self.logger.debug( - "[%s(%s):%s] ssl timeout in : _read_bytes_from_socket", - self.fn or "", - self.host, - self.port, - ) - continue - raise return b"".join(chunks) def _read_message(self):