From 8189c681908be028327114af66ad9b11e04f6be7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 18 Jan 2022 12:35:08 -0600 Subject: [PATCH] fix: remove assert() that shouldn't always be true (#2442) Fixes #2441. --- libtransmission/cache.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libtransmission/cache.cc b/libtransmission/cache.cc index 8a149e674..f671159df 100644 --- a/libtransmission/cache.cc +++ b/libtransmission/cache.cc @@ -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); }