def receive_message(self, request_id):
        """Receive a raw BSON message or raise ConnectionFailure.

        If any exception is raised, the socket is closed.
        """
        try:
            return receive_message(self.sock, request_id,
                                   self.max_message_size)
        except BaseException as error:
            self._raise_connection_failure(error)
Receive a raw BSON message or raise ConnectionFailure.

        If any exception is raised, the socket is closed.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/pool.py