From 609ebdb74ea2db188b0a992e9bfacc590775f427 Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Wed, 16 Jan 2019 09:54:47 -0500 Subject: [PATCH] also run peer server on reflector --- cmd/reflector.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/reflector.go b/cmd/reflector.go index 5f4305d..b4e19f4 100644 --- a/cmd/reflector.go +++ b/cmd/reflector.go @@ -9,6 +9,7 @@ import ( "github.com/lbryio/reflector.go/db" "github.com/lbryio/reflector.go/meta" + "github.com/lbryio/reflector.go/peer" "github.com/lbryio/reflector.go/reflector" "github.com/lbryio/reflector.go/store" @@ -49,8 +50,15 @@ func reflectorCmd(cmd *cobra.Command, args []string) { log.Fatal(err) } + peerServer := peer.NewServer(combo) + err = peerServer.Start(":5567") + if err != nil { + log.Fatal(err) + } + interruptChan := make(chan os.Signal, 1) signal.Notify(interruptChan, os.Interrupt, syscall.SIGTERM) <-interruptChan + peerServer.Shutdown() reflectorServer.Shutdown() }