[gnome-boxes/mcatanzaro/libsoup3: 8/8] 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: 8/8] downloader: Disable network test before download starts
- Date: Fri, 1 Jul 2022 10:25:53 +0000 (UTC)
commit d0a4463b044432a2a6a0db143356fa97237637ae
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]