From 4f83e0d1ea01f133acd5fb5edd6ca8d0a9fe46cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hilmar=20G=C3=BAstafsson?= Date: Fri, 10 Apr 2020 10:21:20 +0200 Subject: [PATCH] Remove p2p logic from dendrite-monolith-server --- cmd/dendrite-monolith-server/main.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index 58d41bd78..9f6531ed3 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -18,7 +18,6 @@ import ( "flag" "net/http" - gostream "github.com/libp2p/go-libp2p-gostream" "github.com/matrix-org/dendrite/appservice" "github.com/matrix-org/dendrite/clientapi" "github.com/matrix-org/dendrite/clientapi/producers" @@ -87,20 +86,6 @@ func main() { logrus.Info("Listening on ", *httpBindAddr) logrus.Fatal(http.ListenAndServe(*httpBindAddr, nil)) }() - // Expose the matrix APIs also via libp2p - if base.LibP2P != nil { - go func() { - logrus.Info("Listening on libp2p host ID ", base.LibP2P.ID()) - listener, err := gostream.Listen(base.LibP2P, "/matrix") - if err != nil { - panic(err) - } - defer func() { - logrus.Fatal(listener.Close()) - }() - logrus.Fatal(http.Serve(listener, nil)) - }() - } // Handle HTTPS if certificate and key are provided go func() { if *certFile != "" && *keyFile != "" {