mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:07:34 +00:00
LibIPC: Always shutdown() the Connection if reached EOF
This commit is contained in:
parent
8fea7d9752
commit
93f656119c
1 changed files with 2 additions and 5 deletions
|
@ -138,11 +138,8 @@ ErrorOr<Vector<u8>> ConnectionBase::read_as_much_as_possible_from_socket_without
|
|||
|
||||
auto nread = maybe_nread.release_value();
|
||||
if (nread == 0) {
|
||||
if (bytes.is_empty()) {
|
||||
deferred_invoke([this] { shutdown(); });
|
||||
return Error::from_string_literal("IPC connection EOF"sv);
|
||||
}
|
||||
break;
|
||||
deferred_invoke([this] { shutdown(); });
|
||||
return Error::from_string_literal("IPC connection EOF"sv);
|
||||
}
|
||||
|
||||
bytes.append(buffer, nread);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue