summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c
index 45aab66f9..a26ef18d3 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -239,6 +239,8 @@ long long timeInMilliseconds(void) {
/* Rehash for an amount of time between ms milliseconds and ms+1 milliseconds */
int dictRehashMilliseconds(dict *d, int ms) {
+ if (d->iterators > 0) return 0;
+
long long start = timeInMilliseconds();
int rehashes = 0;