Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 461601b

Browse files
committed
update
1 parent 9ae7e39 commit 461601b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

engine/services/download_service.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,13 @@ class DownloadService {
178178
continue;
179179
}
180180

181-
if (dltotal == 0) {
182-
// if dltotal is 0, we prevent to send the event
183-
break;
184-
}
185-
186181
item.bytes = dltotal;
187182
item.downloadedBytes = dlnow;
188183

184+
if (item.bytes == 0 || item.bytes == item.downloadedBytes) {
185+
break;
186+
}
187+
189188
// Emit the event
190189
{
191190
std::lock_guard<std::mutex> event_lock(dl_srv->event_emit_map_mutex);

0 commit comments

Comments
 (0)