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
  • Loading branch information
cescoffier committed Mar 8, 2022
1 parent 37a6c9f commit af67521
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,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 @@ -27,7 +28,9 @@ public QuarkusResteasyReactiveRequestContext(Deployment deployment, ProvidersImp
CurrentIdentityAssociation currentIdentityAssociation) {
super(deployment, providers, context, requestContext, handlerChain, abortHandlerChain, devModeTccl);
this.association = currentIdentityAssociation;
VertxContextSafetyToggle.setCurrentContextSafe(true);
if (VertxContext.isOnDuplicatedContext()) {
VertxContextSafetyToggle.setCurrentContextSafe(true);
}
}

protected void handleRequestScopeActivation() {
Expand Down

0 comments on commit af67521

Please sign in to comment.