Skip to content

Commit

Permalink
fail blocking read on read error
Browse files Browse the repository at this point in the history
  • Loading branch information
michalszynkiewicz committed Oct 25, 2019
1 parent fbcff72 commit d0ee454
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vertx/src/main/java/io/undertow/vertx/VertxHttpExchange.java
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,16 @@ public int readBytesAvailable() {
@Override
public ByteBuf readBlocking() throws IOException {
synchronized (request.connection()) {
if (readError != null) {
throw new IOException(readError);
}
while (input1 == null && !eof) {
try {
waitingForRead = true;
request.connection().wait();
if (readError != null) {
throw new IOException(readError);
}
} catch (InterruptedException e) {
throw new InterruptedIOException(e.getMessage());
} finally {
Expand Down

0 comments on commit d0ee454

Please sign in to comment.