[gnome-boxes/mcatanzaro/libsoup3] 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] downloader: Disable network test before download starts
- Date: Tue, 28 Jun 2022 11:37:23 +0000 (UTC)
commit f2344de3f16ecf4eb12f6bd0eea9ba3a624f70f5
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]