Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Feb 2, 2017
1 parent f0c0d6f commit d2be89f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
3 changes: 2 additions & 1 deletion transport/tchannel/channel_outbound_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func TestChannelOutboundHeaders(t *testing.T) {

err = writeArgs(call.Response(), []byte{0x00, 0x00}, []byte("bye!"))
assert.NoError(t, err, "failed to write response")
}))
},
))

out, err := constructor.new(testutils.NewClient(t, &testutils.ChannelOpts{
ServiceName: "caller",
Expand Down
13 changes: 2 additions & 11 deletions transport/tchannel/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,16 @@ func (i *Inbound) Transports() []transport.Transport {
return []transport.Transport{i.transport}
}

// Channel returns the underlying Channel for this Inbound.
func (i *Inbound) Channel() Channel {
return i.transport.ch
}

// Start starts this Inbound. Note that this does not start listening for
// connections; that occurs when you start the underlying ChannelTransport is
// started.
func (i *Inbound) Start() error {
return i.once.Start(func() error {
return nil // Nothing to do
})
return i.once.Start(nil)
}

// Stop stops the TChannel outbound. This currently does nothing.
func (i *Inbound) Stop() error {
return i.once.Stop(func() error {
return nil // Nothing to do
})
return i.once.Stop(nil)
}

// IsRunning returns whether the Inbound is running.
Expand Down
4 changes: 2 additions & 2 deletions transport/tchannel/outbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ func (o *Outbound) Transports() []transport.Transport {
// Start starts the TChannel outbound.
func (o *Outbound) Start() error {
return o.once.Start(func() error {
return nil // Nothing to do
return o.chooser.Start()
})
}

// Stop stops the TChannel outbound.
func (o *Outbound) Stop() error {
return o.once.Stop(func() error {
return nil // Nothing to do
return o.chooser.Stop()
})
}

Expand Down

0 comments on commit d2be89f

Please sign in to comment.