1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibIMAP: Stop leaking a Core::Promise<bool> in IMAP::Client::connect()

This commit is contained in:
Andreas Kling 2021-09-01 22:56:31 +02:00
parent f4c4b42db9
commit 51ae913bfe
4 changed files with 6 additions and 6 deletions

View file

@ -21,7 +21,7 @@ Client::Client(StringView host, unsigned int port, bool start_with_tls)
}
}
Optional<RefPtr<Promise<Empty>>> Client::connect()
RefPtr<Promise<Empty>> Client::connect()
{
bool success;
if (m_tls) {
@ -31,7 +31,7 @@ Optional<RefPtr<Promise<Empty>>> Client::connect()
}
if (!success)
return {};
m_connect_pending = new Promise<bool> {};
m_connect_pending = Promise<bool>::construct();
return m_connect_pending;
}