mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 14:50:18 +00:00
LibIPC: Close the socket and die when the peer is closed
This will close the socket when the recv() returns 0 indicating that the peer has shutdown, and when there are no pending bytes to be processed.
This commit is contained in:
parent
e331ef7057
commit
ab353fd4e1
Notes:
sideshowbarker
2024-07-18 08:49:49 +09:00
Author: https://github.com/gunnarbeutner
Commit: ab353fd4e1
Pull-request: https://github.com/SerenityOS/serenity/pull/8636
Issue: https://github.com/SerenityOS/serenity/issues/8628
Issue: https://github.com/SerenityOS/serenity/issues/8630
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/timmot
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ protected:
|
|||
}
|
||||
if (nread == 0) {
|
||||
if (bytes.is_empty()) {
|
||||
deferred_invoke([this](auto&) { die(); });
|
||||
deferred_invoke([this](auto&) { shutdown(); });
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue