fix: remove assert() that shouldn't always be true (#2442)

Fixes #2441.
This commit is contained in:
Charles Kerr 2022-01-18 12:35:08 -06:00 committed by GitHub
parent 0e3a695af2
commit 8189c68190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -276,12 +276,6 @@ tr_cache* tr_cacheNew(int64_t max_bytes)
void tr_cacheFree(tr_cache* cache)
{
// FIXME(ckerr): this assertion isn't _always_ going to be true,
// e.g. if writing to disk failed due to disk full / permission error etc
// then there is still going to be data sitting in the cache on shutdown.
// Make this assertion smarter or remove it.
TR_ASSERT(tr_ptrArrayEmpty(&cache->blocks));
tr_ptrArrayDestruct(&cache->blocks, nullptr);
tr_free(cache);
}