From b792245f74bb13973ab9121e5d18e4049bf16681 Mon Sep 17 00:00:00 2001 From: Cadey Dodrill Date: Fri, 27 Jan 2017 16:14:05 -0800 Subject: [PATCH] server: grpc hack --- server/server.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/server/server.go b/server/server.go index 3a50a43..3ffe286 100644 --- a/server/server.go +++ b/server/server.go @@ -47,11 +47,11 @@ type Server struct { // Config configures Server type Config struct { - ControlHost, ControlKeyFile string - RethinkDBHost, RethinkDBDatabase string - TorDataDir, TorHashedPassword, TorPassword string - WebPort, DomainSuffix, SSLPort string - CertKey *[32]byte + ControlHost, ControlKeyFile string + RethinkDBHost, RethinkDBDatabase string + TorDataDir, TorHashedPassword, TorPassword string + WebPort, DomainSuffix, SSLPort, GRPCClientPort string + CertKey *[32]byte } // New creates a new Server @@ -132,6 +132,14 @@ func New(cfg Config) (*Server, error) { return nil, err } + grpcl, err := net.Listen("tcp", ":"+cfg.GRPCClientPort) + if err != nil { + return nil, err + } + + // XXX HACK + s.ts.AddAddr(grpcl, nil, "f3724661-af05-41bc-ad99-753b9d631f43") + return s, nil }