Skip to content

Commit

Permalink
Adapt to latest changes in vertx core
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 4, 2024
1 parent a9d9472 commit ec6bff1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void doClose(Promise<Void> p) {
}

public static ContextInternal asEventLoopContext(ContextInternal ctx) {
return ctx.asEventLoopContext();
return ctx.owner().createEventLoopContext(ctx.nettyEventLoop(), ctx.owner().getWorkerPool(), ctx.classLoader());
}

public Future<Connection> connect(ContextInternal context, C options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public boolean isValid() {

@Override
public void init(Holder holder) {
Context context = Vertx.currentContext();
if (context != this.context) {
ContextInternal context = (ContextInternal) Vertx.currentContext();
if (context == null || context.nettyEventLoop() != this.context.nettyEventLoop()) {
throw new IllegalStateException();
}
if (status != Status.CONNECTED) {
Expand Down

0 comments on commit ec6bff1

Please sign in to comment.