From b7233f75b4843833718cb637a5c54b6a7c6826b0 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Fri, 6 Aug 2021 16:05:23 +0300 Subject: [PATCH] Fix minor issues with ResteasyReactiveOutputStream --- .../server/vertx/ResteasyReactiveOutputStream.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/ResteasyReactiveOutputStream.java b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/ResteasyReactiveOutputStream.java index 6a3716004d17e..e7ae4dc1f0d49 100644 --- a/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/ResteasyReactiveOutputStream.java +++ b/independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/ResteasyReactiveOutputStream.java @@ -6,7 +6,6 @@ import io.vertx.core.Context; import io.vertx.core.Handler; import io.vertx.core.buffer.Buffer; -import io.vertx.core.http.HttpConnection; import io.vertx.core.http.HttpServerRequest; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -17,7 +16,7 @@ public class ResteasyReactiveOutputStream extends OutputStream { - private static final Logger log = Logger.getLogger("io.quarkus.quarkus-rest"); + private static final Logger log = Logger.getLogger("org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveOutputStream"); private final ResteasyReactiveRequestContext context; protected final HttpServerRequest request; private ByteBuf pooledBuffer; @@ -45,7 +44,7 @@ public void handle(Throwable event) { request.connection().close(); synchronized (request.connection()) { if (waitingForDrain) { - request.connection().notify(); + request.connection().notifyAll(); } } } @@ -56,7 +55,7 @@ public void handle(Throwable event) { public void handle(Void event) { synchronized (request.connection()) { if (waitingForDrain) { - request.connection().notify(); + request.connection().notifyAll(); } } terminateResponse(); @@ -146,10 +145,9 @@ private void registerDrainHandler() { Handler handler = new Handler() { @Override public void handle(Void event) { - HttpConnection connection = request.connection(); - synchronized (connection) { + synchronized (request.connection()) { if (waitingForDrain) { - connection.notifyAll(); + request.connection().notifyAll(); } if (overflow != null) { if (overflow.size() > 0) {