[gnome-boxes/mcatanzaro/libsoup3: 7/7] downloader: Disable network test before download starts
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/mcatanzaro/libsoup3: 7/7] downloader: Disable network test before download starts
- Date: Tue, 28 Jun 2022 13:50:40 +0000 (UTC)
commit 0a1c5192cf59c96e6b79f7d1fdd57b4579beb2ca
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Jun 28 13:36:09 2022 +0200
downloader: Disable network test before download starts
We can let the download operation beging and just error out if
something goes wrong. AFAIK, there's no need to check the connection
state before doing anything here.
src/downloader.vala | 4 ----
1 file changed, 4 deletions(-)
---
diff --git a/src/downloader.vala b/src/downloader.vala
index d501423f..c79f506c 100644
--- a/src/downloader.vala
+++ b/src/downloader.vala
@@ -127,10 +127,6 @@ public async File download (File remote_file,
private async void download_from_http (Download download, Cancellable? cancellable = null) throws
GLib.Error {
var msg = new Soup.Message ("GET", download.uri);
- var connectable = msg.get_remote_address ();
- var network_monitor = NetworkMonitor.get_default ();
- if (!(yield network_monitor.can_reach_async (connectable)))
- throw new Boxes.Error.INVALID ("Failed to connect to '%s'", connectable.to_string());
GLib.Error? err = null;
int64 total_num_bytes = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]