mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +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();
|
auto nread = maybe_nread.release_value();
|
||||||
if (nread == 0) {
|
if (nread == 0) {
|
||||||
if (bytes.is_empty()) {
|
deferred_invoke([this] { shutdown(); });
|
||||||
deferred_invoke([this] { shutdown(); });
|
return Error::from_string_literal("IPC connection EOF"sv);
|
||||||
return Error::from_string_literal("IPC connection EOF"sv);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes.append(buffer, nread);
|
bytes.append(buffer, nread);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue