fix: TCP network issues
This commit is contained in:
@ -97,11 +97,15 @@ bool lm_pool_info_download(lm_pool_t *pool, lm_mptp_transfer_callback_t callback
|
||||
lm_mptp_set_host(&packet, pool->url.host);
|
||||
lm_mptp_set_data(&packet, pool->url.path, strlen(pool->url.path));
|
||||
|
||||
if(!lm_mptp_client_send(sock, &packet))
|
||||
if(!lm_mptp_client_send(sock, &packet)){
|
||||
pdebug(__func__, "info file request failed for %s: %s", pool->name, lm_strerror());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if(!lm_mptp_recvfile(sock, pool->info_file, callback, data))
|
||||
if(!lm_mptp_recvfile(sock, pool->info_file, callback, data)){
|
||||
pdebug(__func__, "recvfile failed for %s: %s", pool->name, lm_strerror());
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
end:
|
||||
|
@ -123,11 +123,15 @@ bool lm_pool_list_download(lm_pool_t *pool, char *dir, lm_mptp_transfer_callback
|
||||
lm_mptp_set_host(&packet, pool->url.host);
|
||||
lm_mptp_set_data(&packet, pool->url.path, strlen(pool->url.path));
|
||||
|
||||
if(!lm_mptp_client_send(sock, &packet))
|
||||
if(!lm_mptp_client_send(sock, &packet)){
|
||||
pdebug(__func__, "list file request failed for %s: %s", pool->name, lm_strerror());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if(!lm_mptp_recvfile(sock, pool->list_file, callback, data))
|
||||
if(!lm_mptp_recvfile(sock, pool->list_file, callback, data)){
|
||||
pdebug(__func__, "recvfile failed for %s: %s", pool->name, lm_strerror());
|
||||
goto end;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
end:
|
||||
|
Reference in New Issue
Block a user