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

Fix async callback failure leading to `IllegalArgumentException` in `SocketChannel.write()`

Open lorban opened this issue 1 year ago • 1 comments
trafficstars

Prototype fix for #11854

This is a slightly modified version of the original proposal that does not require any modification to the Callback interface: introduce a new CancelableCallback class with a static cancel(Callback, Throwable) helper that actually calls failed() on the callback but not before wrapping the given throwable with a private, maker one that is then detected by the CancelableCallback.failed() implementation to discriminate between canceling and failing logic.

lorban avatar May 31 '24 12:05 lorban

See #11857 for an alternative which adds a cancel() method to Callback.

lorban avatar May 31 '24 12:05 lorban

Abandoned in favor of https://github.com/jetty/jetty.project/pull/11951

lorban avatar Jul 02 '24 08:07 lorban