I have this simple JAX-RS resource using @Suspended AsyncResponse:
The endpoint responds nicely with "Async hello", but after 2 seconds, I see "Timed out!" in the console log.
I'm looking at https://github.com/resteasy/Resteasy/blob/master/resteasy-core/src/main/java/org/jboss/resteasy/plugins/server/servlet/Servlet3AsyncHttpRequest.java#L152 (because this is on Thorntail, which runs JAX-RS on top of servlet, same as WildFly) and the timeoutFuture created there is never cancelled. In my opinion, the future should be cancelled if the response is completed prior to the timeout.
Alternatively, at least the handleTimeout method should check if the response is complete prior to invoking the handler. This is probably easier to implement, but also consumes more resources.