static Iface_DEFUN peerGone(struct Message* msg, struct Pathfinder_pvt* pf) { struct Address addr; addressForNode(&addr, msg); String* str = Address_toString(&addr, msg->alloc); Log_debug(pf->log, "Peer gone [%s]", str->bytes); NodeStore_disconnectedPeer(pf->nodeStore, addr.path); // We notify about the node but with max metric so it will be removed soon. return sendNode(msg, &addr, 0xffffffff, pf); }
void Router_disconnectedPeer(struct Router* r, uint64_t path) { struct Router_pvt* rr = Identity_check((struct Router_pvt*)r); NodeStore_disconnectedPeer(rr->nodeStore, path); }