Skip to content

Commit 4099d5e

Browse files
authored
Update connection.py (#3149)
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).
1 parent 6b89786 commit 4099d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def disconnect(self, *args):
451451
if os.getpid() == self.pid:
452452
try:
453453
conn_sock.shutdown(socket.SHUT_RDWR)
454-
except OSError:
454+
except (OSError, TypeError):
455455
pass
456456

457457
try:

0 commit comments

Comments
 (0)