mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +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
Notes:
sideshowbarker
2024-07-17 19:43:46 +09:00
Author: https://github.com/alimpfard
Commit: 7a95c451a3
Pull-request: https://github.com/SerenityOS/serenity/pull/12235
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/sin-ack ✅
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