From 849f849905e48a44c59f7504267068212e12001b Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sat, 12 Feb 2022 08:07:31 +1000 Subject: [PATCH] LibHTTP: Remove redundant can_read_without_blocking call When entering the InBody state LibHTTP performs a can_read_without_blocking check, which is duplicated immediately afterwards. This initial call is removed. --- Userland/Libraries/LibHTTP/Job.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp index fa6914a119..66ded51f56 100644 --- a/Userland/Libraries/LibHTTP/Job.cpp +++ b/Userland/Libraries/LibHTTP/Job.cpp @@ -380,12 +380,6 @@ void Job::on_socket_connected() } VERIFY(m_state == State::InBody); - auto can_read_without_blocking = m_socket->can_read_without_blocking(); - if (can_read_without_blocking.is_error()) - return deferred_invoke([this] { did_fail(Core::NetworkJob::Error::TransmissionFailed); }); - if (!can_read_without_blocking.value()) - return; - while (true) { auto can_read_without_blocking = m_socket->can_read_without_blocking(); if (can_read_without_blocking.is_error())