[gvfs] ftp: Check connection is usable when acquiring
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] ftp: Check connection is usable when acquiring
- Date: Mon, 11 Aug 2014 01:18:22 +0000 (UTC)
commit 648c433bfbc88aaa757a0adb86b20ca3c986108b
Author: Benjamin Otte <otte redhat com>
Date: Mon Aug 11 03:01:42 2014 +0200
ftp: Check connection is usable when acquiring
Qhen acquiring a cached connection, it might have timeout'ed or
otherwise not be available anymore. We don't want these connection
errors to propagate into the job we're handling and instead just acquire
the next connection.
https://bugzilla.gnome.org/show_bug.cgi?id=591054
daemon/gvfsftptask.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 185ffe2..10aeab4 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -205,7 +205,13 @@ g_vfs_ftp_task_acquire_connection (GVfsFtpTask *task)
task->conn = g_queue_pop_head (ftp->queue);
if (task->conn != NULL)
- break;
+ {
+ if (g_vfs_ftp_connection_is_usable (task->conn))
+ break;
+
+ g_vfs_ftp_connection_free (task->conn);
+ task->conn = NULL;
+ }
if (ftp->connections < ftp->max_connections)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]