This patch changes the policy of the timeout function by cleaning
every timeouted trackers.
Previous code was only freeing the first tracker and this was resulting
in calling the timeout function continuously. One of my previous patch
has modified the function to avoid to run it more than twice a second.
But as it was not taken into account the fact only the first tracker was
freed, the result was that a lot of tracker could not be allocated.
}
/**
- * \brief Timeout a tracker.
+ * \brief Timeout trackers.
*
- * Called when we fail to get a tracker from the pool. The first
- * tracker that has expired will be released back to the pool then the
+ * Called when we fail to get a tracker from the pool. The trackers
+ * that has expired will be released back to the pool then the
* function will exit.
*
* Intended to be called with the tracker pool already locked.
}
while (next != NULL) {
tracker = HashListTableGetListData(next);
+ next = HashListTableGetListNext(next);
if (tracker->timeout < (unsigned int)p->ts.tv_sec) {
int af_family = tracker->af;
tv->sc_perf_pca);
}
}
- return;
}
-
- next = HashListTableGetListNext(next);
}
}