Skip to content

Commit

Permalink
eclipse-vertx#5049 fix Pipe's race condition
Browse files Browse the repository at this point in the history
Fix issue: eclipse-vertx#5049

Signed-off-by: Nils Renaud <renaud.nils@gmail.com>
  • Loading branch information
NilsRenaud committed Dec 22, 2023
1 parent e66fe44 commit 3bb8d6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/vertx/core/streams/impl/PipeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public void to(WriteStream<T> ws, Handler<AsyncResult<Void>> completionHandler)
ws.drainHandler(drainHandler);
}
});
src.resume();
result.future().onComplete(ar -> {
try {
src.handler(null);
Expand All @@ -109,6 +108,7 @@ public void to(WriteStream<T> ws, Handler<AsyncResult<Void>> completionHandler)
handleFailure(err, completionHandler);
}
});
src.resume();
}

private void handleSuccess(Handler<AsyncResult<Void>> completionHandler) {
Expand Down

0 comments on commit 3bb8d6c

Please sign in to comment.