Skip to content

Commit

Permalink
Update connection.py (#3149)
Browse files Browse the repository at this point in the history
Exception ignored in: <function Redis.__del__ at ...>
Traceback ....
TypeError: 'NoneType' object cannot be interpreted as an integer.

This happens when closing the connection within a spawned Process (multiprocess).
  • Loading branch information
wKollendorf authored and vladvildanov committed Sep 27, 2024
1 parent f276b88 commit e0c1ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def disconnect(self, *args):
if os.getpid() == self.pid:
try:
conn_sock.shutdown(socket.SHUT_RDWR)
except OSError:
except (OSError, TypeError):
pass

try:
Expand Down

0 comments on commit e0c1ef0

Please sign in to comment.