summaryrefslogtreecommitdiff
path: root/daemon/gvfsjob.c
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-09-13 12:00:15 +0100
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-09-27 10:42:41 +0100
commitfcffe33ba57f968e2cb0073cb201007808155702 (patch)
treea6c051ef71deeeba86a33269f7d8d9675ae8de32 /daemon/gvfsjob.c
parentc6200ea2184b63016fe573155b0480ba88069456 (diff)
downloadgvfs-fcffe33ba57f968e2cb0073cb201007808155702.tar.gz
Allow cancelling jobs that have sent a reply but not finished
A few job types (mount, unmount and enumerate) can be in a state where sent_reply is TRUE but finished is FALSE because they override send_reply. If the peer connection closes during this period, the daemon hangs in peer_connection_closed because the job still exists but cannot be cancelled. To fix this, allow cancelling jobs that have sent a reply but not yet finished. This can be reproduced fairly easily by doing a search on an sftp mount in Nautilus. https://bugzilla.gnome.org/show_bug.cgi?id=720860
Diffstat (limited to 'daemon/gvfsjob.c')
-rw-r--r--daemon/gvfsjob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/gvfsjob.c b/daemon/gvfsjob.c
index 84f2e554..53e38725 100644
--- a/daemon/gvfsjob.c
+++ b/daemon/gvfsjob.c
@@ -221,7 +221,7 @@ g_vfs_job_try (GVfsJob *job)
void
g_vfs_job_cancel (GVfsJob *job)
{
- if (job->cancelled || job->sent_reply)
+ if (job->cancelled || job->finished)
return;
job->cancelled = TRUE;