aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-sync-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-sync-stream.c')
-rw-r--r--mail/em-sync-stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index e8aad7f31c..82c8b20aeb 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -59,6 +59,13 @@ emss_process_message (struct _write_msg *msg)
{
struct _EMSyncStream *emss = msg->emss;
+ if (emss->cancel) {
+ /* Do not pass data to the child if we are canceled. */
+ e_flag_set (msg->done);
+
+ return FALSE;
+ }
+
/* Force out any pending data before doing anything else. */
if (emss->buffer != NULL && emss->buffer->len > 0) {
EMSS_CLASS (emss)->sync_write (