mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibCore: Stop buffering when a zero-size slice is read regardless of EOF
The meaning of EOF depends on the underlying socket, but an empty slice should terminate the buffering (otherwise we'd just spin forever).
This commit is contained in:
parent
9ee5107871
commit
7a95c451a3
1 changed files with 3 additions and 0 deletions
|
@ -664,6 +664,9 @@ public:
|
|||
|
||||
if (populated_slice.contains_slow('\n'))
|
||||
return true;
|
||||
|
||||
if (populated_slice.is_empty())
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue