diff --git a/Userland/Services/RequestServer/ConnectionCache.h b/Userland/Services/RequestServer/ConnectionCache.h index 61c3ab4c22..07b8e503be 100644 --- a/Userland/Services/RequestServer/ConnectionCache.h +++ b/Userland/Services/RequestServer/ConnectionCache.h @@ -106,7 +106,7 @@ template ErrorOr recreate_socket_if_needed(T& connection, URL const& url) { using SocketType = typename T::SocketType; - if (!connection.socket->is_open()) { + if (!connection.socket->is_open() || connection.socket->is_eof()) { // Create another socket for the connection. auto set_socket = [&](auto socket) -> ErrorOr { connection.socket = TRY(Core::Stream::BufferedSocket::create(move(socket)));