aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-store.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 067221571a..eb66f48725 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -919,10 +919,13 @@ connect_to_server_wrapper (CamelService *service, CamelException *ex)
if (ai == NULL)
return FALSE;
- if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL)
+ if (!(ret = connect_to_server (service, ai, mode, ex)) && mode == MODE_SSL) {
+ camel_exception_clear (ex);
ret = connect_to_server (service, ai, MODE_TLS, ex);
- else if (!ret && mode == MODE_TLS)
+ } else if (!ret && mode == MODE_TLS) {
+ camel_exception_clear (ex);
ret = connect_to_server (service, ai, MODE_CLEAR, ex);
+ }
camel_freeaddrinfo (ai);