Skip to content
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

Fix RESTEasy reactive race #19112

Merged
merged 1 commit into from
Jul 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected boolean isRequestScopeManagementRequired() {
@Override
public void run() {
running = true;
boolean submittedToExecutor = false;
boolean processingSuspended = false;
//if this is a blocking target we don't activate for the initial non-blocking part
//unless there are pre-mapping filters as these may require CDI
boolean disasociateRequestScope = false;
Expand Down Expand Up @@ -153,13 +153,14 @@ public void run() {
this.executor = null;
} else if (suspended) {
running = false;
processingSuspended = true;
return;
}
}
if (exec != null) {
//outside sync block
exec.execute(this);
submittedToExecutor = true;
processingSuspended = true;
return;
}
}
Expand All @@ -183,7 +184,7 @@ public void run() {
} finally {
// we need to make sure we don't close the underlying stream in the event loop if the task
// has been offloaded to the executor
if (position == handlers.length && !suspended && !submittedToExecutor) {
if (position == handlers.length && !processingSuspended) {
close();
} else {
if (disasociateRequestScope) {
Expand Down