skip download request where client cannot be found

This commit is contained in:
cy33hc
2026-05-30 21:33:09 -07:00
parent 65dceb8c25
commit 81533f5a28
+6 -1
View File
@@ -187,7 +187,7 @@ namespace HttpServer
RemoteClient *tmp_client = GetRemoteClient(&(bg_download_list[i].host_info)); RemoteClient *tmp_client = GetRemoteClient(&(bg_download_list[i].host_info));
if (tmp_client == nullptr) if (tmp_client == nullptr)
{ {
break; continue;;
} }
g_bytes_transfered = &(bg_download_list[i].bytes_transfered); g_bytes_transfered = &(bg_download_list[i].bytes_transfered);
@@ -227,6 +227,11 @@ namespace HttpServer
{ {
// Resume interrupted download // Resume interrupted download
RemoteClient *tmp_client = GetRemoteClient(&(bg_download_list[i].host_info)); RemoteClient *tmp_client = GetRemoteClient(&(bg_download_list[i].host_info));
if (tmp_client == nullptr)
{
continue;
}
g_bytes_transfered = &(bg_download_list[i].bytes_transfered); g_bytes_transfered = &(bg_download_list[i].bytes_transfered);
if (bg_download_list[i].host_info.type == CLIENT_TYPE_FTP) if (bg_download_list[i].host_info.type == CLIENT_TYPE_FTP)
{ {