summaryrefslogtreecommitdiffstats
path: root/examples/imapresource/imapserverproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r--examples/imapresource/imapserverproxy.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/imapresource/imapserverproxy.cpp b/examples/imapresource/imapserverproxy.cpp
index 4ef3000..e329911 100644
--- a/examples/imapresource/imapserverproxy.cpp
+++ b/examples/imapresource/imapserverproxy.cpp
@@ -171,7 +171,11 @@ KAsync::Job<void> ImapServerProxy::logout()
171 return KAsync::null(); 171 return KAsync::null();
172 } 172 }
173 } 173 }
174 return runJob(new KIMAP2::LogoutJob(mSession)); 174 if (mSession->state() == KIMAP2::Session::State::Authenticated || mSession->state() == KIMAP2::Session::State::Selected) {
175 return runJob(new KIMAP2::LogoutJob(mSession));
176 } else {
177 return KAsync::null();
178 }
175} 179}
176 180
177KAsync::Job<SelectResult> ImapServerProxy::select(const QString &mailbox) 181KAsync::Job<SelectResult> ImapServerProxy::select(const QString &mailbox)