LibCore: Add support for LocalServer to propogate accept() errors

We still log the error (perhaps in the future, we will only want to log
the error if there is no handler). But this allows callers to actually
handle errors to e.g. unblock waiters.
This commit is contained in:
Timothy Flynn 2022-11-08 09:30:25 -05:00 committed by Tim Flynn
commit a4fc7dbf6d
Notes: sideshowbarker 2024-07-17 10:31:19 +09:00
2 changed files with 4 additions and 1 deletions

View file

@ -24,6 +24,7 @@ public:
ErrorOr<NonnullOwnPtr<Stream::LocalSocket>> accept();
Function<void(NonnullOwnPtr<Stream::LocalSocket>)> on_accept;
Function<void(Error)> on_accept_error;
private:
explicit LocalServer(Object* parent = nullptr);