unicast: Process timeouts equal to current time.

Don't postpone processing of a timeout if it is equal to the current
time. This prevents an infinite loop with a simulated clock.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
master
Miroslav Lichvar 2018-09-25 18:16:19 +02:00 committed by Richard Cochran
parent 2b00608278
commit 241d8a064e
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ int unicast_service_timer(struct port *p)
pr_debug("peek i={2^%d} tmo={%ld,%ld}", interval->log_period,
interval->tmo.tv_sec, interval->tmo.tv_nsec);
if (timespec_compare(&now, &interval->tmo) >= 0) {
if (timespec_compare(&now, &interval->tmo) > 0) {
break;
}
interval = pqueue_extract(p->unicast_service->queue);