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 dvora-h committed Feb 25, 2024
1 parent b3f4710 commit 7fa3bd4
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 @@ -417,7 +417,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 7fa3bd4

Please sign in to comment.