jetty.project icon indicating copy to clipboard operation
jetty.project copied to clipboard

Strengthen the Request.addFailureListener() contract

Open sbordet opened this issue 5 months ago • 0 comments
trafficstars

Jetty version(s) 12.0.x

Description The current javadoc of Request.addFailureListener() is under-specified and not particularly clear.

Furthermore, there is a chance that a failure happens when the demand callback is just about to be run. In this case, the demand callback will read a failure, and the failure listener will be invoked. We can easily cover for this case, since we control all threads.

In the case of threads spawned by the application, the failure can be notified both via a read and via the failure listener, since we have no control over the threads.

sbordet avatar May 27 '25 09:05 sbordet