修复kotlin设置配置文件ide报错的问题 https://github.com/AriaLyy/Aria/issues/286

This commit is contained in:
laoyuyu
2018-08-20 22:03:05 +08:00
parent 6d5398de40
commit 7f975b2e91
22 changed files with 77 additions and 90 deletions

View File

@@ -92,7 +92,7 @@ public final class Util {
byte[] buffer = new byte[bufferSize > 0 ? bufferSize : DEFAULT_COPY_BUFFER_SIZE];
try {
while ((numBytes = source.read(buffer)) != -1) {
while (!Thread.currentThread().isInterrupted() && (numBytes = source.read(buffer)) != -1) {
// Technically, some read(byte[]) methods may return 0 and we cannot
// accept that as an indication of EOF.