From d0f88d49585f147164c676e2615767cba98d5fae Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Mon, 27 May 2024 19:07:30 +0100 Subject: [PATCH] LibProtocol: Retry reading if read errors with EAGAIN This fixes an issue where fetch requests to HTTP(s) addresses would fail inside workers. --- Userland/Libraries/LibProtocol/Request.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibProtocol/Request.cpp b/Userland/Libraries/LibProtocol/Request.cpp index 2218418fa7e..13dfd9077a7 100644 --- a/Userland/Libraries/LibProtocol/Request.cpp +++ b/Userland/Libraries/LibProtocol/Request.cpp @@ -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;