Skip to content

Commit 681d904

Browse files
authored
Update Response.java
1 parent 26eab3f commit 681d904

File tree

1 file changed

+1
-2
lines changed
  • core/src/main/java/org/nanohttpd/protocols/http/response

1 file changed

+1
-2
lines changed

core/src/main/java/org/nanohttpd/protocols/http/response/Response.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,7 @@ private void sendBody(OutputStream outputStream, long pending) throws IOExceptio
349349
long bytesToRead = sendEverything ? BUFFER_SIZE : Math.min(pending, BUFFER_SIZE);
350350
int read = this.data.read(buff, 0, (int) bytesToRead);
351351
if (read <= 0) {
352-
if(this.requestMethod == Method.POST) break;
353-
Thread.sleep(1000);
352+
if(this.getRequestMethod() == Method.POST) break;
354353
}
355354
try {
356355
outputStream.write(buff, 0, read);

0 commit comments

Comments
 (0)