'Execute an operation. Reset the server on network error.
Returns fn()\'s return value on success. On error, clears the server\'s
pool and marks the server Unknown.
Re-raises any exception thrown by fn().'

def _reset_on_error(self, server, func, *args, **kwargs):

    try:
        return func(*args, **kwargs)
    except NetworkTimeout:
        raise
    except ConnectionFailure:
        self.__reset_server(server.description.address)
        raise
