mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
RequestServer: Do not VERIFY(request.total_size.has_value())
If the request is stopped RequestServer::did_finish_request() will crash on the VERIFY() call since request.total_size.has_value() returns false. Let us instead use a conditional expression to verify if it has a value and then call async_request_finished().
This commit is contained in:
parent
2fa907b31a
commit
1e1d59cc25
1 changed files with 2 additions and 3 deletions
|
@ -81,9 +81,8 @@ void ConnectionFromClient::did_receive_headers(Badge<Request>, Request& request)
|
|||
|
||||
void ConnectionFromClient::did_finish_request(Badge<Request>, Request& request, bool success)
|
||||
{
|
||||
VERIFY(request.total_size().has_value());
|
||||
|
||||
async_request_finished(request.id(), success, request.total_size().value());
|
||||
if (request.total_size().has_value())
|
||||
async_request_finished(request.id(), success, request.total_size().value());
|
||||
|
||||
m_requests.remove(request.id());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue