Libnetapi: fix abortion of file requests.
* We didn't wait for the thread to terminate, so the thread could use the object after deletion.
This commit is contained in:
parent
0d50f6af5b
commit
6e38076e81
@ -29,6 +29,9 @@ BFileRequest::BFileRequest(const BUrl& url, BUrlProtocolListener* listener,
|
||||
|
||||
BFileRequest::~BFileRequest()
|
||||
{
|
||||
status_t status = Stop();
|
||||
if (status == B_OK)
|
||||
wait_for_thread(fThreadId, &status);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user