outgoing: cut some slack in the "packet from future" check

git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@661 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
This commit is contained in:
Heikki Hannikainen 2012-08-19 06:16:20 +00:00
parent 5299767e71
commit 8dac08e58d
1 changed files with 4 additions and 1 deletions

View File

@ -126,7 +126,10 @@ void process_outgoing(struct worker_t *self)
hlog(LOG_ERR, "worker %d: process_outgoing got pbuf %d marked free, age %d (now %d t %d)\n%*s",
self->id, pb->seqnum, tick - pb->t, tick, pb->t, pb->packet_len-2, pb->data);
abort();
} else if (pb->t > tick) {
} else if (pb->t > tick + 2) {
/* 1-second offset is normal in case of one thread updating tick earlier than another
* and a little thread scheduling luck
*/
hlog(LOG_ERR, "worker %d: process_outgoing got packet %d from future with t %d > tick %d!\n%*s",
self->id, pb->seqnum, pb->t, tick, pb->packet_len-2, pb->data);
} else if (tick - pb->t > 5) {