CLOCK_MONOTONIC might be implemented as the time since the CPU booted, so
if MeshLink starts soon after booting, setting timers to "0" might not
actually be far enough in the past to trigger a timeout.
This has almost no effect in practice, since most timeouts are a minute or
less, but it might affect running tests in virtual machines.
node_t *n = (node_t *)node;
connection_t *c = n->connection;
- n->last_req_key = 0;
+ n->last_req_key = -3600;
if(c) {
- c->last_key_renewal = 0;
+ c->last_key_renewal = -3600;
}
}
});
}
- c->last_ping_time = 0;
+ c->last_ping_time = -3600;
}
} else {
n->status.validkey = false;
sptps_stop(&n->sptps);
n->status.waitingforkey = false;
- n->last_req_key = 0;
+ n->last_req_key = -3600;
n->status.udp_confirmed = false;
n->maxmtu = MTU;
n->status.validkey = false;
sptps_stop(&n->sptps);
n->status.waitingforkey = false;
- n->last_req_key = 0;
+ n->last_req_key = -3600;
n->status.udp_confirmed = false;
n->maxmtu = MTU;
n->status.validkey = false;
sptps_stop(&n->sptps);
n->status.waitingforkey = false;
- n->last_req_key = 0;
+ n->last_req_key = -3600;
} else {
n->last_req_key = mesh->loop.now.tv_sec;
}
}
if(!c->status.pinged) {
- c->last_ping_time = 0;
+ c->last_ping_time = -3600;
}
sockaddr_t sa;