mirror of
https://github.com/apache/maven.git
synced 2025-02-08 19:15:12 +00:00
[MNG-8339] An error during transfer output seems to freeze the output (#1842)
This commit is contained in:
parent
b5a8a8a349
commit
c5a1c53e5c
@ -80,8 +80,9 @@ public void transferProgressed(TransferEvent event) throws TransferCancelledExce
|
||||
Iterator<TransferResourceAndSize> entries = transfers.values().iterator();
|
||||
while (entries.hasNext()) {
|
||||
TransferResourceAndSize entry = entries.next();
|
||||
long total = entry.resource.getContentLength();
|
||||
Long complete = entry.transferredBytes;
|
||||
// just in case, make sure 0 <= complete <= total
|
||||
long complete = Math.max(0, entry.transferredBytes);
|
||||
long total = Math.max(complete, entry.resource.getContentLength());
|
||||
|
||||
String resourceName = entry.resource.getResourceName();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user