Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Lopes <[email protected]>
  • Loading branch information
pmlopes committed Apr 4, 2022
1 parent 45227c5 commit bb34b23
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import io.vertx.core.*;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.impl.ContextInternal;
import io.vertx.core.impl.VertxInternal;
import io.vertx.core.impl.logging.Logger;
import io.vertx.core.impl.logging.LoggerFactory;
Expand Down Expand Up @@ -132,7 +133,8 @@ private void writeInternal(String msg, Promise<Void> promise) {

@Override
public Future<Void> write(Buffer buffer) {
final Promise<Void> promise = ((VertxInternal) vertx).promise();
final ContextInternal callerCtx = (ContextInternal) vertx.getOrCreateContext();
final Promise<Void> promise = callerCtx.promise();
if (isClosed()) {
final Context ctx = transportCtx;
if (Vertx.currentContext() != ctx) {
Expand All @@ -149,7 +151,8 @@ public Future<Void> write(Buffer buffer) {

@Override
public Future<Void> write(String text) {
final Promise<Void> promise = ((VertxInternal) vertx).promise();
final ContextInternal callerCtx = (ContextInternal) vertx.getOrCreateContext();
final Promise<Void> promise = callerCtx.promise();
if (isClosed()) {
final Context ctx = transportCtx;
if (Vertx.currentContext() != ctx) {
Expand Down

0 comments on commit bb34b23

Please sign in to comment.