aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-remote-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-remote-store.c')
-rw-r--r--camel/camel-remote-store.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index 52f1908f05..41e16a27fc 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -538,6 +538,11 @@ remote_recv_line (CamelRemoteStore *store, char **dest, CamelException *ex)
camel_exception_set(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled"));
else
camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, strerror(errno));
+ } else if (bytes->len == 0) {
+ camel_exception_set(ex, CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
+ _("Server unexpectedly disconnected"));
+ }
+ if (camel_exception_is_set (ex)) {
g_byte_array_free(bytes, TRUE);
camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL);
return -1;