mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-24 11:11:51 +00:00
LibCore: Make TCPServer::listen() report failure instead of asserting
This commit is contained in:
parent
d79194d87f
commit
f88a7cd4e1
Notes:
sideshowbarker
2024-07-19 02:08:24 +09:00
Author: https://github.com/awesomekling
Commit: f88a7cd4e1
3 changed files with 15 additions and 8 deletions
|
@ -73,8 +73,12 @@ int main(int argc, char** argv)
|
|||
client->start();
|
||||
};
|
||||
|
||||
server->listen({}, port);
|
||||
printf("Listening on 0.0.0.0:%d\n", port);
|
||||
if (!server->listen({}, port)) {
|
||||
warnf("Failed to listen on 0.0.0.0:{}", port);
|
||||
return 1;
|
||||
}
|
||||
|
||||
outf("Listening on 0.0.0.0:{}", port);
|
||||
|
||||
if (unveil("/res/icons", "r") < 0) {
|
||||
perror("unveil");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue