mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibIMAP: Stop leaking a Core::Promise<bool> in IMAP::Client::connect()
This commit is contained in:
parent
f4c4b42db9
commit
51ae913bfe
4 changed files with 6 additions and 6 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue