feat(tui): surface the failure reason on failed downloads
Carry a human-readable reason on DownloadStatus::Failed so it flows through the existing status channel to the TUI. The download Info pane now shows an Error line for a failed download (connect failure, peer disconnect, truncated transfer, peer-reported upload failure, or the underlying transfer error). Failures without a known reason render as before.
This commit is contained in:
@@ -614,7 +614,7 @@ fn a_file_downloads_from_a_peer_over_p_and_f_connections() {
|
||||
completed = true;
|
||||
break;
|
||||
}
|
||||
Ok(DownloadStatus::Failed | DownloadStatus::TimedOut) => {
|
||||
Ok(DownloadStatus::Failed(_) | DownloadStatus::TimedOut) => {
|
||||
break;
|
||||
}
|
||||
_ => {}
|
||||
@@ -862,7 +862,7 @@ fn a_file_downloads_from_a_peer_via_direct_connection() {
|
||||
completed = true;
|
||||
break;
|
||||
}
|
||||
Ok(DownloadStatus::Failed | DownloadStatus::TimedOut) => break,
|
||||
Ok(DownloadStatus::Failed(_) | DownloadStatus::TimedOut) => break,
|
||||
_ => {}
|
||||
}
|
||||
if client
|
||||
@@ -1021,7 +1021,7 @@ fn a_file_downloads_from_a_firewalled_peer_via_server_broker() {
|
||||
completed = true;
|
||||
break;
|
||||
}
|
||||
Ok(DownloadStatus::Failed | DownloadStatus::TimedOut) => break,
|
||||
Ok(DownloadStatus::Failed(_) | DownloadStatus::TimedOut) => break,
|
||||
_ => {}
|
||||
}
|
||||
if client
|
||||
@@ -1122,7 +1122,7 @@ fn two_real_clients_search_and_download() {
|
||||
completed = true;
|
||||
break;
|
||||
}
|
||||
Ok(DownloadStatus::Failed | DownloadStatus::TimedOut) => break,
|
||||
Ok(DownloadStatus::Failed(_) | DownloadStatus::TimedOut) => break,
|
||||
_ => {}
|
||||
}
|
||||
if leecher
|
||||
|
||||
Reference in New Issue
Block a user