Skip to content

Commit

Permalink
Update AliyunpanDownloader.swift
Browse files Browse the repository at this point in the history
fix updateNetworkSpeed bug, change 'min' to 'max'
  • Loading branch information
QuanGe authored Dec 15, 2023
1 parent 502a5c2 commit 1338f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AliyunpanSDK/HTTPRequest/AliyunpanDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public class AliyunpanDownloader: NSObject {
}

@objc private func updateNetworkSpeed() {
let offset = min(totalWritedSize - lastTotalWritedSize, 0)
let offset = max(totalWritedSize - lastTotalWritedSize, 0)
networkSpeedMonitor?(offset)
lastTotalWritedSize = totalWritedSize
}
Expand Down

0 comments on commit 1338f13

Please sign in to comment.