grey-software / toonin

Technology that allows you to tune in to your friends and family in realtime using peer-to-peer sharing.
https://toonin.grey.software
MIT License
67 stars 6 forks source link

Update network trees properly when any node disconnects #144

Closed Lakshya2610 closed 4 years ago

Lakshya2610 commented 4 years ago

Delete nodes from tree when they disconnect to make sure that new nodes don't try to connect to them

Lakshya2610 commented 4 years ago

Tree seems to updating correctly after commit https://github.com/grey-software/toonin/commit/fa2b8d3dfb97b975cd5802446ffc2243676cc563 . Still need to do some testing to be sure. Nodes now report to backend if their client disconnects to make sure the tree is updated in case if the client failed to do so. So whenever a node leaves, it is removed from tree after notification of leaving from that node itself or its parent node.