jetty / jetty/jetty.project

Strengthen the `Request.addFailureListener()` contract

Open
#13,176 1 comment 0 reactions 3 assignees Claimed by @gregw View on GitHub
Bug
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.