summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-04-04 12:23:10 +0200
committerantirez <antirez@gmail.com>2016-05-02 08:42:17 +0200
commitaa79c1f1c1d288e4cc2c0f4689ad01488678bf9d (patch)
treee8afcc3fadd805b69fee18da6467192b61685f12
parent0b69c9865619b54b75576e67aaafe7b018734bec (diff)
downloadredis-aa79c1f1c1d288e4cc2c0f4689ad01488678bf9d.tar.gz
ae.c: comment to explain why we have a useless maxId check.
-rw-r--r--src/ae.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ae.c b/src/ae.c
index 79fcde62a..bee9d4ad6 100644
--- a/src/ae.c
+++ b/src/ae.c
@@ -303,7 +303,11 @@ static int processTimeEvents(aeEventLoop *eventLoop) {
continue;
}
- /* Don't process time events created by time events in this iteration. */
+ /* Make sure we don't process time events created by time events in
+ * this iteration. Note that this check is currently useless: we always
+ * add new timers on the head, however if we change the implementation
+ * detail, this check may be useful again: we keep it here for future
+ * defense. */
if (te->id > maxId) {
te = te->next;
continue;