From d84793ec433cd74d7277c424dce03513a2c2595a Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 29 Apr 2014 00:30:26 +1000 Subject: [PATCH] Make sure to not remove the last 2 workbases when ageing them --- src/stratifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index d3b7eeb4..559694a3 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -341,6 +341,8 @@ static void update_base(ckpool_t *ckp) } sprintf(wb->idstring, "%08x", wb->id); HASH_ITER(hh, workbases, tmp, tmpa) { + if (HASH_COUNT(workbases) < 3) + break; /* Age old workbases older than 10 minutes old */ if (tmp->gentime < wb->gentime - 600) { HASH_DEL(workbases, tmp);