Skip to content

Commit

Permalink
checks if the current context is a duplicated context before marking …
Browse files Browse the repository at this point in the history
…it as safe.

Workaround for quarkusio#24156

(cherry picked from commit af67521)
  • Loading branch information
cescoffier authored and gsmet committed Mar 9, 2022
1 parent aa9458e commit 20e5300
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.quarkus.security.identity.SecurityIdentity;
import io.quarkus.vertx.core.runtime.context.VertxContextSafetyToggle;
import io.quarkus.vertx.http.runtime.security.QuarkusHttpUser;
import io.smallrye.common.vertx.VertxContext;
import io.vertx.ext.web.RoutingContext;

public class QuarkusResteasyReactiveRequestContext extends VertxResteasyReactiveRequestContext {
Expand All @@ -30,7 +31,9 @@ public QuarkusResteasyReactiveRequestContext(Deployment deployment, ProvidersImp
super(deployment, providers, context, requestContext, handlerChain, abortHandlerChain, devModeTccl,
vertxContextPropsToCopy);
this.association = currentIdentityAssociation;
VertxContextSafetyToggle.setCurrentContextSafe(true);
if (VertxContext.isOnDuplicatedContext()) {
VertxContextSafetyToggle.setCurrentContextSafe(true);
}
}

protected void handleRequestScopeActivation() {
Expand Down

0 comments on commit 20e5300

Please sign in to comment.