mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibRequests: Don't crash on requests without a read stream finishing
This can now happen due to the hostname not existing, as RS explicitly performs DNS resolution before setting up the response pipe.
This commit is contained in:
parent
7e20f4726f
commit
879ae94183
|
|
@ -123,7 +123,7 @@ void Request::set_up_internal_stream_data(DataReceived on_data_available)
|
|||
};
|
||||
|
||||
m_internal_stream_data->on_finish = [this, user_on_finish = move(user_on_finish)]() {
|
||||
if (!m_internal_stream_data->user_finish_called && m_internal_stream_data->read_stream->is_eof()) {
|
||||
if (!m_internal_stream_data->user_finish_called && (!m_internal_stream_data->read_stream || m_internal_stream_data->read_stream->is_eof())) {
|
||||
m_internal_stream_data->user_finish_called = true;
|
||||
user_on_finish(m_internal_stream_data->total_size, m_internal_stream_data->network_error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user