Skip to content

Commit e363fc7

Browse files
committed
nit
1 parent e0fa776 commit e363fc7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

client/src/test/java/org/asynchttpclient/handler/BodyDeferringAsyncHandlerTest.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.nio.charset.StandardCharsets;
3131
import java.util.concurrent.ExecutionException;
3232
import java.util.concurrent.Future;
33-
import java.util.concurrent.TimeoutException;
3433

3534
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
3635
import static io.netty.handler.codec.http.HttpHeaderValues.APPLICATION_OCTET_STREAM;
@@ -230,14 +229,12 @@ public void handle(String pathInContext, Request request, HttpServletRequest htt
230229
}
231230
}
232231

233-
if (wantFailure) {
234-
if (i > CONTENT_LENGTH_VALUE / 2) {
235-
// kaboom
236-
// yes, response is committed, but Jetty does aborts and
237-
// drops connection
238-
httpResponse.sendError(500);
239-
break;
240-
}
232+
if (wantFailure && i > CONTENT_LENGTH_VALUE / 2) {
233+
// kaboom
234+
// yes, response is committed, but Jetty does aborts and
235+
// drops connection
236+
httpResponse.sendError(500);
237+
break;
241238
}
242239
}
243240

0 commit comments

Comments
 (0)