| 418 | #endif |
| 419 | |
| 420 | NetRequest::~NetRequest() |
| 421 | { |
| 422 | Cleanup(); |
| 423 | // This is synchronized |
| 424 | if (mResult != NULL) |
| 425 | { |
| 426 | mResult->mFailed = mFailed; |
| 427 | mResult->mError = mError; |
| 428 | mResult->mCurRequest = NULL; |
| 429 | if (mResult->mDoneEvent != NULL) |
| 430 | { |
| 431 | mResult->mDoneEvent->Set(true); |
| 432 | BF_ASSERT(!mResult->mRemoved); |
| 433 | } |
| 434 | if (mResult->mRemoved) |
| 435 | delete mResult; |
| 436 | } |
| 437 | |
| 438 | mNetManager->mRequestDoneEvent.Set(); |
| 439 | } |
| 440 | |
| 441 | void NetRequest::Fail(const StringImpl& error) |
| 442 | { |