Yggdrasil demo: Add Stop functions

This commit is contained in:
Neil Alexander 2020-07-06 17:09:02 +01:00
parent 6c4eabbe92
commit 00e0df7c87
2 changed files with 14 additions and 0 deletions

View file

@ -156,6 +156,13 @@ func Setup(instanceName, instancePeer, storageDirectory string, enableMulticast
return n, nil
}
func (n *Node) Stop() {
if err := n.multicast.Stop(); err != nil {
n.log.Println("Error stopping multicast:", err)
}
n.core.Stop()
}
func (n *Node) DerivedServerName() string {
return hex.EncodeToString(n.SigningPublicKey())
}