Repository navigation
feat: add ResponseBodyControl.execute to decide in sequence with body delivery #2359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0fd1488
188250b
00568c3
1a055b0
172e27b
70a0b0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,7 +186,9 @@ private void endSuspension() { | |
| } | ||
| } | ||
|
|
||
| private void execute(Runnable task) { | ||
| @Override | ||
| public void execute(Runnable task) { | ||
| Objects.requireNonNull(task, "task"); | ||
| if (channel.eventLoop().inEventLoop()) { | ||
| task.run(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What should happen when
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I documented it, in 1a055b0. The Javadoc now says that the task must not throw, and what happens if it does:
Tests cover queued-task exceptions on HTTP/1.1 and HTTP/2: the response is not failed automatically, and a later task can still resume it. Separate HTTP/1.1 tests verify that inline exceptions propagate from I also tried routing it to the handler's failure path. That works, but |
||
| } else { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NettyResponseBodyControldoesrequireNonNull(task, "task"), this one NPEs fromtask.run()without a message. Same check here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 172e27b, with a test for the message.