LibWeb/WebDriver: Close client connection socket when EOF is reached
Fixes the bug that currently we don't ever close webdriver client connection socket when header "Connection: keep-alive" is specified. This allows to run more WPT tests without running out of free file descriptors :)
This commit is contained in:
parent
d4f5e6eb81
commit
f04ae5f542
Notes:
sideshowbarker
2024-07-16 23:52:10 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/f04ae5f542 Pull-request: https://github.com/SerenityOS/serenity/pull/19481
1 changed files with 3 additions and 1 deletions
|
@ -219,8 +219,10 @@ ErrorOr<void, Client::WrappedError> Client::on_ready_to_read()
|
|||
auto data = TRY(m_socket->read_some(buffer));
|
||||
TRY(m_remaining_request.try_append(StringView { data }));
|
||||
|
||||
if (m_socket->is_eof())
|
||||
if (m_socket->is_eof()) {
|
||||
die();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_remaining_request.is_empty())
|
||||
|
|
Loading…
Add table
Reference in a new issue