Skip to content

Commit

Permalink
Non-blocking should throw an EOFException on EOF as well.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1718690 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Dec 8, 2015
1 parent 5f126cb commit 91b7859
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions java/org/apache/tomcat/util/net/NioEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package org.apache.tomcat.util.net;

import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -1267,6 +1268,9 @@ private int fillReadBuffer(boolean block) throws IOException {
}
} else {
nRead = channel.read(socketBufferHandler.getReadBuffer());
if (nRead == -1) {
throw new EOFException();
}
}
return nRead;
}
Expand Down
4 changes: 4 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
Improve OpenSSL keystore/truststore configuration by using the code
from the JSSE implementation. (remm, jfclere)
</fix>
<fix>
Fix a potential loop when a client drops the connection unexpectedly.
(markt)
</fix>
</changelog>
</subsection>
<subsection name="Jasper">
Expand Down

0 comments on commit 91b7859

Please sign in to comment.