summaryrefslogtreecommitdiff
path: root/Userland/Applications/Mail
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-01 22:56:31 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-01 23:02:18 +0200
commit51ae913bfe3ee42c7da949b32f313a79e9c9f143 (patch)
treeb449eb78e002f0b0b7194c5c1109dbac0daa8508 /Userland/Applications/Mail
parentf4c4b42db90aa16cdedb6d8b9bc9f3ade96a5284 (diff)
downloadserenity-51ae913bfe3ee42c7da949b32f313a79e9c9f143.zip
LibIMAP: Stop leaking a Core::Promise<bool> in IMAP::Client::connect()
Diffstat (limited to 'Userland/Applications/Mail')
-rw-r--r--Userland/Applications/Mail/MailWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Mail/MailWidget.cpp b/Userland/Applications/Mail/MailWidget.cpp
index d2804e5143..709f7406b5 100644
--- a/Userland/Applications/Mail/MailWidget.cpp
+++ b/Userland/Applications/Mail/MailWidget.cpp
@@ -125,11 +125,11 @@ bool MailWidget::connect_and_login()
m_imap_client = make<IMAP::Client>(server, port, tls);
auto connection_promise = m_imap_client->connect();
- if (!connection_promise.has_value()) {
+ if (!connection_promise) {
GUI::MessageBox::show_error(window(), String::formatted("Failed to connect to '{}:{}' over {}.", server, port, tls ? "TLS" : "Plaintext"));
return false;
}
- connection_promise.value()->await();
+ connection_promise->await();
auto response = m_imap_client->login(username, password)->await().release_value();