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 Feb 19, 2024
1 parent 6b89786 commit 4099d5e
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 4099d5e

Please sign in to comment.