This commit is contained in:
Victor Shcherb 2013-01-22 20:25:37 +01:00 committed by Alexey Pelykh
parent f1b2b3f78d
commit c8ca83836a

View File

@ -108,7 +108,8 @@ public class RandomAccessFile {
int n = 0; int n = 0;
do { do {
int count = readBytes(peer, position, b, off + n, len - n); int count = readBytes(peer, position, b, off + n, len - n);
if (count < 0) position += count;
if (count == 0)
throw new EOFException(); throw new EOFException();
n += count; n += count;
} while (n < len); } while (n < len);