mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +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
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