b/f: fix index search for search from the past

sayer/1.4-spce2.6
Stefan Sayer 15 years ago committed by Stefan Sayer
parent d56e0fec7f
commit 7a6126210d

@ -237,13 +237,13 @@ bool RegistrationTimer::insert_timer_leastloaded(RegTimer* timer,
return false;
}
int res_index = from_index;
if (from_index < 0) {
// use now .. to_index
DBG("from_time (%ld) in the past - searching load loaded from now()\n", from_time);
from_index = current_bucket;
}
// find least loaded bucket
int res_index = from_index;
size_t least_load = buckets[from_index].timers.size();
int i = from_index;

Loading…
Cancel
Save