| 386 | } |
| 387 | |
| 388 | BgFetch::~BgFetch() |
| 389 | { |
| 390 | TSHandleMLocRelease(_mbuf, TS_NULL_MLOC, _headerLoc); |
| 391 | TSHandleMLocRelease(_mbuf, TS_NULL_MLOC, _urlLoc); |
| 392 | |
| 393 | TSMBufferDestroy(_mbuf); |
| 394 | |
| 395 | if (vc) { |
| 396 | PrefetchError("Destroyed BgFetch while VC was alive"); |
| 397 | TSVConnClose(vc); |
| 398 | vc = nullptr; |
| 399 | } |
| 400 | |
| 401 | if (nullptr != _cont) { |
| 402 | if (_askPermission) { |
| 403 | _state->release(_cachekey); |
| 404 | _state->uniqueRelease(_cachekey); |
| 405 | } |
| 406 | |
| 407 | TSContDestroy(_cont); |
| 408 | _cont = nullptr; |
| 409 | |
| 410 | TSIOBufferReaderFree(req_io_buf_reader); |
| 411 | TSIOBufferDestroy(req_io_buf); |
| 412 | TSIOBufferReaderFree(resp_io_buf_reader); |
| 413 | TSIOBufferDestroy(resp_io_buf); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | bool |
| 418 | BgFetch::schedule(BgFetchState *state, const PrefetchConfig &config, bool askPermission, TSMBuffer requestBuffer, |
nothing calls this directly
no test coverage detected