mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-26 23:36:32 +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:
committed by
Andreas Kling
parent
e331ef7057
commit
ab353fd4e1
@@ -196,7 +196,7 @@ protected:
|
||||
}
|
||||
if (nread == 0) {
|
||||
if (bytes.is_empty()) {
|
||||
deferred_invoke([this](auto&) { die(); });
|
||||
deferred_invoke([this](auto&) { shutdown(); });
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user