'Wrap Cursor next method.
This method will be executed before each Cursor next method call.'

@safe_mongo_call
def next(self):

    try:
        save_cursor = self.cursor.clone()
        return self.cursor.next()
    except pymongo.errors.AutoReconnect:
        self.cursor = save_cursor
        raise
