diff --git a/daemon/gvfschannel.c b/daemon/gvfschannel.c
index efe2376..016aec9 100644
--- a/daemon/gvfschannel.c
+++ b/daemon/gvfschannel.c
@@ -61,6 +61,7 @@ typedef struct
 {
   GVfsChannel *channel;
   GInputStream *command_stream;
+  GCancellable *cancellable;
   char buffer[G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE];
   int buffer_size;
   char *data;
@@ -84,6 +85,7 @@ struct _GVfsChannelPrivate
   GVfsBackend *backend;
   gboolean connection_closed;
   GInputStream *command_stream;
+  GCancellable *cancellable;
   GOutputStream *reply_stream;
   int remote_fd;
   GPid actual_consumer;
@@ -116,6 +118,18 @@ static void g_vfs_channel_set_property (GObject      *object,
 
 
 static void
+g_vfs_channel_dispose (GObject *object)
+{
+  GVfsChannel *channel = G_VFS_CHANNEL (object);
+
+  /* Cancel the reader */
+  g_cancellable_cancel (channel->priv->cancellable);
+
+  if (G_OBJECT_CLASS (g_vfs_channel_parent_class)->dispose)
+    (*G_OBJECT_CLASS (g_vfs_channel_parent_class)->dispose) (object);
+}
+
+static void
 g_vfs_channel_finalize (GObject *object)
 {
   GVfsChannel *channel;
@@ -137,6 +151,10 @@ g_vfs_channel_finalize (GObject *object)
   if (channel->priv->command_stream)
     g_object_unref (channel->priv->command_stream);
   channel->priv->command_stream = NULL;
+
+  if (channel->priv->cancellable)
+    g_object_unref (channel->priv->cancellable);
+  channel->priv->cancellable = NULL;
   
   if (channel->priv->remote_fd != -1)
     close (channel->priv->remote_fd);
@@ -163,6 +181,7 @@ g_vfs_channel_class_init (GVfsChannelClass *klass)
   g_type_class_add_private (klass, sizeof (GVfsChannelPrivate));
   
   gobject_class->finalize = g_vfs_channel_finalize;
+  gobject_class->dispose = g_vfs_channel_dispose;
   gobject_class->set_property = g_vfs_channel_set_property;
   gobject_class->get_property = g_vfs_channel_get_property;
 
@@ -204,6 +223,7 @@ g_vfs_channel_init (GVfsChannel *channel)
   else
     {
       channel->priv->command_stream = g_unix_input_stream_new (socket_fds[0], TRUE);
+      channel->priv->cancellable = g_cancellable_new ();
       channel->priv->reply_stream = g_unix_output_stream_new (socket_fds[0], FALSE);
       channel->priv->remote_fd = socket_fds[1];
       
@@ -284,6 +304,8 @@ static void
 request_reader_free (RequestReader *reader)
 {
   g_object_unref (reader->command_stream);
+  g_object_unref (reader->cancellable);
+  g_object_unref (reader->channel);
   g_free (reader->data);
   g_free (reader);
 }
@@ -426,7 +448,7 @@ finish_request (RequestReader *reader)
   g_input_stream_read_async (reader->command_stream,
 			     reader->buffer + reader->buffer_size,
 			     G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
-			     0, NULL,
+			     0, reader->cancellable,
 			     command_read_cb,
 			     reader);
 }
@@ -440,13 +462,6 @@ data_read_cb (GObject *source_object,
   GInputStream *stream = G_INPUT_STREAM (source_object);
   gssize count_read;
 
-  if (reader->channel == NULL)
-    {
-      /* Channel was finalized */
-      request_reader_free (reader);
-      return;
-    }
-
   count_read = g_input_stream_read_finish (stream, res, NULL);
   
   if (count_read <= 0)
@@ -464,7 +479,7 @@ data_read_cb (GObject *source_object,
       g_input_stream_read_async (reader->command_stream,
 				 reader->data + reader->data_pos,
 				 reader->data_len - reader->data_pos,
-				 0, NULL,
+				 0, reader->cancellable,
 				 data_read_cb, reader);
       return;
     }
@@ -484,13 +499,6 @@ command_read_cb (GObject *source_object,
   guint32 data_len;
   gssize count_read;
 
-  if (reader->channel == NULL)
-    {
-      /* Channel was finalized */
-      request_reader_free (reader);
-      return;
-    }
-
   count_read = g_input_stream_read_finish (stream, res, NULL);
   
   if (count_read <= 0)
@@ -508,7 +516,7 @@ command_read_cb (GObject *source_object,
       g_input_stream_read_async (reader->command_stream,
 				 reader->buffer + reader->buffer_size,
 				 G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
-				 0, NULL, 
+				 0, reader->cancellable,
 				 command_read_cb, reader);
       return;
     }
@@ -525,7 +533,7 @@ command_read_cb (GObject *source_object,
       g_input_stream_read_async (reader->command_stream,
 				 reader->data + reader->data_pos,
 				 reader->data_len - reader->data_pos,
-				 0, NULL,
+				 0, reader->cancellable,
 				 data_read_cb, reader);
       return;
     }
@@ -539,13 +547,14 @@ start_request_reader (GVfsChannel *channel)
   RequestReader *reader;
 
   reader = g_new0 (RequestReader, 1);
-  reader->channel = channel;
+  reader->channel = g_object_ref (channel);
+  reader->cancellable = g_object_ref (channel->priv->cancellable);
   reader->command_stream = g_object_ref (channel->priv->command_stream);
   
   g_input_stream_read_async (reader->command_stream,
 			     reader->buffer + reader->buffer_size,
 			     G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
-			     0, NULL,
+			     0, reader->cancellable,
 			     command_read_cb, reader);
 
   channel->priv->request_reader = reader;
diff --git a/daemon/gvfsjobcloseread.c b/daemon/gvfsjobcloseread.c
index 217dfed..851efd3 100644
--- a/daemon/gvfsjobcloseread.c
+++ b/daemon/gvfsjobcloseread.c
@@ -45,6 +45,7 @@ g_vfs_job_close_read_finalize (GObject *object)
   GVfsJobCloseRead *job;
 
   job = G_VFS_JOB_CLOSE_READ (object);
+  g_object_run_dispose (G_OBJECT (job->channel));
   g_object_unref (job->channel);
 
   if (G_OBJECT_CLASS (g_vfs_job_close_read_parent_class)->finalize)
diff --git a/daemon/gvfsjobclosewrite.c b/daemon/gvfsjobclosewrite.c
index e621c51..bad0dcb 100644
--- a/daemon/gvfsjobclosewrite.c
+++ b/daemon/gvfsjobclosewrite.c
@@ -45,6 +45,7 @@ g_vfs_job_close_write_finalize (GObject *object)
   GVfsJobCloseWrite *job;
 
   job = G_VFS_JOB_CLOSE_WRITE (object);
+  g_object_run_dispose (G_OBJECT (job->channel));
   g_object_unref (job->channel);
   g_free (job->etag);
 
