Skip to content

Commit

Permalink
Renamed idsChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
oxtoacart committed Nov 27, 2014
1 parent 19eb4d5 commit c2ab040
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type Client struct {
// IdChannel is a channel that publishes this client's PeerId as it first
// becomes available and changes on subsequent reconnects. A channel is used
// here because the PeerId changes with each reconnect.
IdChannel <-chan PeerId
idChannel chan PeerId
UpdatedIdsCh <-chan PeerId
updatedIdsCh chan PeerId

connInfoChs chan chan *connInfo
connErrCh chan error
Expand All @@ -53,8 +53,8 @@ type DialFunc func() (net.Conn, error)
// Note - whether or not auto reconnecting is enabled, this method doesn't
// return until a connection has been established or we've failed trying.
func (c *Client) Connect() (PeerId, error) {
c.idChannel = make(chan PeerId, 100)
c.IdChannel = c.idChannel
c.updatedIdsCh = make(chan PeerId, 100)
c.UpdatedIdsCh = c.updatedIdsCh
c.connInfoChs = make(chan chan *connInfo)
c.connErrCh = make(chan error)
c.topicsOut = make(map[TopicId]*topic)
Expand Down
2 changes: 1 addition & 1 deletion connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (c *Client) connectOnce() (*connInfo, error) {
}
info.id = msg.From
select {
case c.idChannel <- info.id:
case c.updatedIdsCh <- info.id:
log.Trace("Published id")
default:
log.Trace("No one listening for id")
Expand Down

0 comments on commit c2ab040

Please sign in to comment.