Skip to content

Commit

Permalink
Use routing context end handler
Browse files Browse the repository at this point in the history
Setting the end handler on the response means the routing contexts end
handler is not called.
  • Loading branch information
stuartwdouglas committed Sep 8, 2022
1 parent 036a69f commit e568521
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.netty.buffer.ByteBuf;
import io.netty.buffer.PooledByteBufAllocator;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.vertx.core.AsyncResult;
import io.vertx.core.Context;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
Expand Down Expand Up @@ -53,9 +54,9 @@ public void handle(Throwable event) {
}
});

request.response().endHandler(new Handler<Void>() {
context.getContext().addEndHandler(new Handler<AsyncResult<Void>>() {
@Override
public void handle(Void event) {
public void handle(AsyncResult<Void> event) {
synchronized (request.connection()) {
if (waitingForDrain) {
request.connection().notifyAll();
Expand Down

0 comments on commit e568521

Please sign in to comment.