diff options
Diffstat (limited to 'examples/imapresource/imapserverproxy.cpp')
-rw-r--r-- | examples/imapresource/imapserverproxy.cpp | 6 |
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 | ||
177 | KAsync::Job<SelectResult> ImapServerProxy::select(const QString &mailbox) | 181 | KAsync::Job<SelectResult> ImapServerProxy::select(const QString &mailbox) |