Skip to content

Commit d66ce92

Browse files
bwangelmeJens-G
authored andcommitted
fix: make timeout error more future
Client: ["python"]
1 parent f17d36c commit d66ce92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/py/src/transport/TSocket.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ def open(self):
159159
def read(self, sz):
160160
try:
161161
buff = self.handle.recv(sz)
162-
except socket.timeout as e:
162+
# TODO: remove socket.timeout when 3.10 becomes the earliest version of python supported.
163+
except (socket.timeout, TimeoutError) as e:
163164
raise TTransportException(type=TTransportException.TIMED_OUT, message="read timeout", inner=e)
164165
except socket.error as e:
165166
if (e.args[0] == errno.ECONNRESET and

0 commit comments

Comments
 (0)