Skip to content

Commit

Permalink
Revert "Raise OperationalError for socket timeouts"
Browse files Browse the repository at this point in the history
This reverts commit d4e11c3.
  • Loading branch information
jiezhen-chen committed Aug 4, 2023
1 parent 4c98a0c commit 53a1dad
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions redshift_connector/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,7 @@ def get_calling_module() -> str:
self._usock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
except socket.error as e:
self._usock.close()
if socket.timeout:
raise OperationalError("connection time out", e)
else:
raise InterfaceError("communication error", e)
raise InterfaceError("communication error", e)
self._flush: typing.Callable = self._sock.flush
self._read: typing.Callable = self._sock.read
self._write: typing.Callable = self._sock.write
Expand Down

0 comments on commit 53a1dad

Please sign in to comment.