private void whenRequestCancelled(Throwable cause) {
        if (isDone()) {
            return;
        }
        final TimeoutHandler handler = timeoutHandler;
        if (cause instanceof TimeoutException && handler != null) {
            // if cancellation caused by a timeout - invoke the timeout handler
            // timeout handler must resume or cancel the response.
            handler.handleTimeout(this);
        } else {
            // cancel response by default
            cancel(); // responds with SERVICE_UNAVAILABLE
        }
    }
Invoked when request has been cancelled for any reason, including timeout.
Invokes configured {@link TimeoutHandler} when cancellation triggered by a timeout,
otherwise triggers {@link #cancel()}.
The {@link TimeoutHandler} must either {@link #resume(Object)}/{@link #resume(Throwable)} or
{@link #cancel()} the suspended response.
Resetting timeout inside the timeout handler is not supported.
@param cause {@link Throwable} cancellation cause
resteasy/src/main/java/com/linecorp/armeria/server/resteasy/ResteasyAsynchronousResponseImpl.java