diff options
author | Alexander Narsudinov <a.narsudinov@gmail.com> | 2022-12-18 00:50:14 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-20 10:45:20 +0100 |
commit | e279a1723b8a9ecc4f36b4cdbf0faa408a05282f (patch) | |
tree | 3d9d620fcd0d46a0c7e222857d55e9421912063e /Userland/Services/LookupServer/LookupServer.cpp | |
parent | 767529ebf5b0108296428cdd2c45de50c3a29176 (diff) | |
download | serenity-e279a1723b8a9ecc4f36b4cdbf0faa408a05282f.zip |
LookupServer: Propagate the errors from MulticastDNS::lookup()
This patch slightly change the signature of lookup() method
and propagates all the errors to the caller with help of ErrorOr.
Diffstat (limited to 'Userland/Services/LookupServer/LookupServer.cpp')
-rw-r--r-- | Userland/Services/LookupServer/LookupServer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/LookupServer/LookupServer.cpp b/Userland/Services/LookupServer/LookupServer.cpp index 9f946c4fc7..5b77ca408a 100644 --- a/Userland/Services/LookupServer/LookupServer.cpp +++ b/Userland/Services/LookupServer/LookupServer.cpp @@ -183,7 +183,7 @@ ErrorOr<Vector<Answer>> LookupServer::lookup(Name const& name, RecordType record // Fourth, look up .local names using mDNS instead of DNS nameservers. if (name.as_string().ends_with(".local"sv)) { - answers = m_mdns->lookup(name, record_type); + answers = TRY(m_mdns->lookup(name, record_type)); for (auto& answer : answers) put_in_cache(answer); return answers; |