Skip to content

Commit

Permalink
Use the correct context for RR
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Feb 3, 2022
1 parent 8280c53 commit 96c64fd
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,14 @@ public VertxResteasyReactiveRequestContext(Deployment deployment, ProvidersImpl
this.devModeTccl = devModeTccl;
context.addHeadersEndHandler(this);
String expect = request.getHeader(HttpHeaderNames.EXPECT);
ContextInternal internal = ((ConnectionBase) context.request().connection()).getContext();
if (!vertxContextPropsToCopy.isEmpty()) {
ContextInternal current = (ContextInternal) Vertx.currentContext();
Map<Object, Object> internalLocalContextData = internal.localContextData();
Map<Object, Object> currentLocalContextData = current.localContextData();
for (int i = 0; i < vertxContextPropsToCopy.size(); i++) {
String name = vertxContextPropsToCopy.get(i);
Object value = currentLocalContextData.get(name);
if (value != null) {
internalLocalContextData.put(name, value);
}
}
}
ContextInternal current = (ContextInternal) Vertx.currentContext();
if (expect != null && expect.equalsIgnoreCase(CONTINUE)) {
continueState = ContinueState.REQUIRED;
}
this.contextExecutor = new Executor() {
@Override
public void execute(Runnable command) {
internal.runOnContext(new Handler<Void>() {
current.runOnContext(new Handler<Void>() {
@Override
public void handle(Void unused) {
command.run();
Expand Down

0 comments on commit 96c64fd

Please sign in to comment.