Fix wait for thread not started

This commit is contained in:
Samuele Panzeri 2023-04-27 18:34:30 +02:00
parent 240ed28291
commit 4aaa2e6477
16 changed files with 45 additions and 18 deletions

View file

@ -190,7 +190,9 @@ void HTTPRequest::cancel_request() {
set_process_internal(false);
} else {
thread_request_quit.set();
thread.wait_to_finish();
if (thread.is_started()) {
thread.wait_to_finish();
}
}
file.unref();