diff options
Diffstat (limited to 'Userland/Libraries/LibProtocol')
-rw-r--r-- | Userland/Libraries/LibProtocol/Request.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibProtocol/Request.cpp b/Userland/Libraries/LibProtocol/Request.cpp index 35b7cbb2c7..bf506c2582 100644 --- a/Userland/Libraries/LibProtocol/Request.cpp +++ b/Userland/Libraries/LibProtocol/Request.cpp @@ -52,12 +52,12 @@ void Request::stream_into_impl(T& stream) if (result.is_error()) continue; auto nread = result.value(); + if (nread == 0) + break; if (!stream.write_or_error({ buf, nread })) { // FIXME: What do we do here? TODO(); } - if (nread == 0) - break; } while (true); if (m_internal_stream_data->read_stream->is_eof() && m_internal_stream_data->request_done) { |