From 051a0be95cbe4fe5eb0c7431e13987a2aa56bcc0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 10 Jan 2017 20:44:08 +0100 Subject: Logout after synchronization --- examples/imapresource/imapresource.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'examples/imapresource/imapresource.cpp') diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index be8ade5..4f7b9f3 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp @@ -449,6 +449,13 @@ public: commit(); return *folderList; }); + }) + .then([=] (const KAsync::Error &error) { + if (error) { + SinkWarning() << "Error during sync: " << error.errorMessage; + } + return imap->logout() + .then(KAsync::error(error)); }); } else if (query.type() == ApplicationDomain::getTypeName()) { //TODO @@ -513,6 +520,13 @@ public: }); }); } + }) + .then([=] (const KAsync::Error &error) { + if (error) { + SinkWarning() << "Error during sync: " << error.errorMessage; + } + return imap->logout() + .then(KAsync::error(error)); }); } return KAsync::error("Nothing to do"); -- cgit v1.2.3