Forbids interrupted exception shown
This commit is contained in:
@@ -95,7 +95,9 @@ public final class GetTask extends TaskResult<String> {
|
||||
while ((len = input.read(buf)) != -1) {
|
||||
baos.write(buf, 0, len);
|
||||
read += len;
|
||||
updateProgress(read, size);
|
||||
|
||||
if (size >= 0)
|
||||
updateProgress(read, size);
|
||||
|
||||
if (Thread.currentThread().isInterrupted())
|
||||
return;
|
||||
|
||||
@@ -184,7 +184,6 @@ public final class TaskExecutor {
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
if (task.getSignificance().shouldLog()) {
|
||||
lastException = e;
|
||||
Logging.LOG.log(Level.FINE, "Task aborted: " + task.getName());
|
||||
task.onDone().fireEvent(new TaskEvent(this, task, true));
|
||||
taskListeners.forEach(it -> it.onFailed(task, e));
|
||||
|
||||
Reference in New Issue
Block a user