Commit f5e9f532 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't update seqnos more than once per second.

parent a1f28869
......@@ -1055,7 +1055,12 @@ send_wildcard_retraction(struct network *net)
void
update_myseqno(int force)
{
if(force || timeval_minus_msec(&now, &seqno_time) >= seqno_interval) {
int delay = timeval_minus_msec(&now, &seqno_time);
if(delay < 1000)
return;
if(force || delay >= seqno_interval) {
myseqno = seqno_plus(myseqno, 1);
seqno_time = now;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment