Skip to content

Commit

Permalink
Merge pull request quarkusio#19272 from geoand/rros-polish
Browse files Browse the repository at this point in the history
Fix minor issues with ResteasyReactiveOutputStream
  • Loading branch information
stuartwdouglas authored Aug 16, 2021
2 parents 8e79350 + b7233f7 commit 278966b
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -45,7 +44,7 @@ public void handle(Throwable event) {
request.connection().close();
synchronized (request.connection()) {
if (waitingForDrain) {
request.connection().notify();
request.connection().notifyAll();
}
}
}
Expand All @@ -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();
Expand Down Expand Up @@ -147,10 +146,9 @@ private void registerDrainHandler() {
Handler<Void> handler = new Handler<Void>() {
@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) {
Expand Down

0 comments on commit 278966b

Please sign in to comment.