Mercurial > prosody-hg
diff util/indexedbheap.lua @ 11115:7d4c292f178e 0.11
util.indexedbheap: Fix heap datastructure corruption in :reschedule(smaller_value)
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 29 Sep 2020 21:27:16 -0500 |
| parents | e5d00bf4a4d5 |
| children |
line wrap: on
line diff
--- a/util/indexedbheap.lua Mon Jun 15 14:16:34 2020 +0100 +++ b/util/indexedbheap.lua Tue Sep 29 21:27:16 2020 -0500 @@ -23,7 +23,7 @@ local tmp_sync = sync[k]; while k ~= 1 do local parent = math_floor(k/2); - if tmp < self[parent] then break; end + if tmp >= self[parent] then break; end self[k] = self[parent]; sync[k] = sync[parent]; index[sync[k]] = k;
