Skip to content

Commit

Permalink
Allocate only one top channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuntao Lu committed Apr 3, 2017
1 parent 1faa5ab commit b10ce88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 0 additions & 8 deletions runtime/gateway.go
Expand Up @@ -356,14 +356,6 @@ func (gateway *Gateway) setupHTTPServer() error {
}

func (gateway *Gateway) setupTChannel(config *StaticConfig) error {
// TODO: (lu) channel name and opts
ch, err := tchannel.NewChannel("Gateway", nil)
if err != nil {
return err
}

gateway.Channel = ch

tchannelServer, err := NewTChannelServer(
&TChannelServerOptions{
ServiceName: config.MustGetString("tchannel.serviceName"),
Expand Down
2 changes: 2 additions & 0 deletions runtime/tchannel_server.go
Expand Up @@ -68,5 +68,7 @@ func NewTChannelServer(opts *TChannelServerOptions, gateway *Gateway) (*zt.Serve
err)
}

gateway.Channel = channel

return zt.NewServer(channel, gateway.Logger), nil
}

0 comments on commit b10ce88

Please sign in to comment.