]> git.meshlink.io Git - meshlink/commit - test/channels-failure.c
Allow the mesh to detect when a node has completely restarted. features/detect-restarted-nodes
authorGuus Sliepen <guus@meshlink.io>
Sun, 13 Oct 2019 21:32:03 +0000 (23:32 +0200)
committerGuus Sliepen <guus@meshlink.io>
Mon, 14 Oct 2019 19:27:01 +0000 (21:27 +0200)
commit947f09ff2c507a80bbe7f92ed0d41b06c98d5375
tree1d6458514ce5e443c389b9021f6ef2e2da5f8bc3
parentf9235480fa69f92b50156ac8b6a70f3558bb0bbf
Allow the mesh to detect when a node has completely restarted.

When calling meshlink_open(), a node creates a unique ID that is passed
along ADD_EDGE messages. When a node becomes unreachable and then reachable
again, this allows other nodes to detect whether it was just a temporary
network issue, or whether the node completely restarted (either because
meshlink_close() was called or because it crashed).

At the moment, when this is detected, other nodes close all open channels
with the restarted node.
src/edge.h
src/graph.c
src/meshlink.c
src/meshlink_internal.h
src/node.h
src/protocol_edge.c
test/channels-failure.c