aboutsummaryrefslogtreecommitdiff
path: root/build/gobind/monolith.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-07-06 17:09:02 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2020-07-06 17:09:02 +0100
commit00e0df7c87915c4b073626bffeead879166526a9 (patch)
treedbfe8cbc6d8a215bc501f264f6ef921ec3d44785 /build/gobind/monolith.go
parent6c4eabbe92b607433766bd4b5ca27c1dd0b3480e (diff)
Yggdrasil demo: Add Stop functions
Diffstat (limited to 'build/gobind/monolith.go')
-rw-r--r--build/gobind/monolith.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/gobind/monolith.go b/build/gobind/monolith.go
index b73e47f8..d415143e 100644
--- a/build/gobind/monolith.go
+++ b/build/gobind/monolith.go
@@ -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()
+}