mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8189366: SocketInputStream.available() should check for eof
Reviewed-by: chegar
This commit is contained in:
parent
1d8a27195c
commit
f4df5cb4c3
2 changed files with 66 additions and 19 deletions
|
@ -232,7 +232,11 @@ class SocketInputStream extends FileInputStream {
|
|||
* @return the number of immediately available bytes
|
||||
*/
|
||||
public int available() throws IOException {
|
||||
return impl.available();
|
||||
if (eof) {
|
||||
return 0;
|
||||
} else {
|
||||
return impl.available();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue