X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet.c;h=d930d1fdd7a2c36e61ee4b11a88f9e32a7a43cf7;hb=3909ee8107713ddf930291317fe1747a1667d584;hp=101c95792dc3eb76476205a85dd3f68bd0b149b7;hpb=d02bbd19c40e977f019d2c8bc80fe57059946d6e;p=meshlink-tiny diff --git a/src/net.c b/src/net.c index 101c957..d930d1f 100644 --- a/src/net.c +++ b/src/net.c @@ -101,12 +101,6 @@ static void timeout_handler(event_loop_t *loop, void *data) { } // Also make sure that if outstanding key requests for the UDP counterpart of a connection has timed out, we restart it. - if(c->node) { - if(c->node->status.waitingforkey && c->node->last_req_key + pingtimeout < mesh->loop.now.tv_sec) { - send_req_key(mesh, c->node); - } - } - if(c->status.active && c->last_key_renewal + 3600 < mesh->loop.now.tv_sec) { devtool_sptps_renewal_probe((meshlink_node_t *)c->node); @@ -191,21 +185,6 @@ static void periodic_handler(event_loop_t *loop, void *data) { logger(mesh, MESHLINK_DEBUG, "Could not update %s", n->name); } } - - if(n->status.reachable && n->status.validkey && n->last_req_key + 3600 < mesh->loop.now.tv_sec) { - logger(mesh, MESHLINK_DEBUG, "SPTPS key renewal for node %s", n->name); - devtool_sptps_renewal_probe((meshlink_node_t *)n); - - if(!sptps_force_kex(&n->sptps)) { - logger(mesh, MESHLINK_ERROR, "SPTPS key renewal for node %s failed", n->name); - n->status.validkey = false; - sptps_stop(&n->sptps); - n->status.waitingforkey = false; - n->last_req_key = -3600; - } else { - n->last_req_key = mesh->loop.now.tv_sec; - } - } } timeout_set(&mesh->loop, data, &(struct timespec) {