From 7de1bafcab547d03eff5323f2af3f4e92bd95a83 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sun, 4 May 2025 22:16:29 +0200 Subject: Remove the duplicate resize hack It turns out this problem also included a bunch of other data corruption issues. I don't really know how that got in there, but I don't think this was a data-structure issue. We should revert to an assert to crash hard. We now have some checks that should give us a warning closer to when the corruption happens next time. --- src/peers.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/peers.c') diff --git a/src/peers.c b/src/peers.c index 4688738..9aff14b 100644 --- a/src/peers.c +++ b/src/peers.c @@ -74,11 +74,7 @@ static int resize(size_t new_size) { struct peer_entry* new_entry = NULL; find(new_table, new_size, &entry->key, &new_entry); - if(new_entry->set) { - // This should never happen but sometimes does - dbg("WARN: Dropping duplicate peer table entry as part of resize"); - continue; - } + assert(!new_entry->set); *new_entry = *entry; } -- cgit v1.2.3