[gvfs] Allow cancelling jobs that have sent a reply but not finished
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] Allow cancelling jobs that have sent a reply but not finished
- Date: Sat, 27 Sep 2014 09:43:26 +0000 (UTC)
commit fcffe33ba57f968e2cb0073cb201007808155702
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sat Sep 13 12:00:15 2014 +0100
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
daemon/gvfsjob.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsjob.c b/daemon/gvfsjob.c
index 84f2e55..53e3872 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]