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

@ -180,3 +180,10 @@ func (m *DendriteMonolith) Start(staticPeer string, enableMulticast bool) {
logger.Fatal(httpServer.Serve(m.listener))
}()
}
func (m *DendriteMonolith) Stop() {
if err := m.listener.Close(); err != nil {
logrus.Warn("Error stopping listener:", err)
}
m.YggdrasilNode.Stop()
}