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>
This commit is contained in:
		
							parent
							
								
									2b00608278
								
							
						
					
					
						commit
						241d8a064e
					
				| @ -502,7 +502,7 @@ int unicast_service_timer(struct port *p) | |||||||
| 		pr_debug("peek i={2^%d} tmo={%ld,%ld}", interval->log_period, | 		pr_debug("peek i={2^%d} tmo={%ld,%ld}", interval->log_period, | ||||||
| 			 interval->tmo.tv_sec, interval->tmo.tv_nsec); | 			 interval->tmo.tv_sec, interval->tmo.tv_nsec); | ||||||
| 
 | 
 | ||||||
| 		if (timespec_compare(&now, &interval->tmo) >= 0) { | 		if (timespec_compare(&now, &interval->tmo) > 0) { | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| 		interval = pqueue_extract(p->unicast_service->queue); | 		interval = pqueue_extract(p->unicast_service->queue); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user