Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor issues with ResteasyReactiveOutputStream #19272

Merged
merged 1 commit into from
Aug 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -146,10 +145,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