Retry fetching remote text file when downloading had been terminated

This commit is contained in:
huanghongxun committed 2019-01-13 16:50:54 +08:00
1 parent 481b47bf10
commit fc3f2e045b
1 file changed
+1 -1
@@ -126,7 +126,7 @@ public final class GetTask extends TaskResult<String> {
}
if (size > 0 && size != read)
throw new IllegalStateException("Not completed! Readed: " + read + ", total size: " + size);
throw new IOException("Not completed! Readed: " + read + ", total size: " + size);
String result = baos.toString(charset.name());
setResult(result);