diff --git a/redis/connection.py b/redis/connection.py index c9f7fc55d0..617d04af5c 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -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: