LibProtocol: Retry reading if read errors with EAGAIN

This fixes an issue where fetch requests to HTTP(s) addresses would
fail inside workers.
This commit is contained in:
Tim Ledbetter 2024-05-27 19:07:30 +01:00 committed by Andreas Kling
parent bb923983fc
commit d0f88d4958
Notes: sideshowbarker 2024-07-18 01:43:16 +09:00

View file

@ -140,7 +140,7 @@ void Request::set_up_internal_stream_data(DataReceived on_data_available)
do {
auto result = m_internal_stream_data->read_stream->read_some({ buffer, buffer_size });
if (result.is_error() && (!result.error().is_errno() || (result.error().is_errno() && result.error().code() != EINTR)))
if (result.is_error() && (!result.error().is_errno() || (result.error().is_errno() && (result.error().code() != EINTR && result.error().code() != EAGAIN))))
break;
if (result.is_error())
continue;