Skip to content

Commit 7fa3bd4

Browse files
wKollendorfdvora-h
authored andcommitted
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 b3f4710 commit 7fa3bd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def disconnect(self, *args):
417417
if os.getpid() == self.pid:
418418
try:
419419
conn_sock.shutdown(socket.SHUT_RDWR)
420-
except OSError:
420+
except (OSError, TypeError):
421421
pass
422422

423423
try:

0 commit comments

Comments
 (0)