1
Fork 0
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:
Ali Mohammad Pur 2022-02-02 19:09:05 +03:30 committed by Andreas Kling
parent 9ee5107871
commit 7a95c451a3

View file

@ -664,6 +664,9 @@ public:
if (populated_slice.contains_slow('\n'))
return true;
if (populated_slice.is_empty())
break;
}
return false;