Skip to content

Commit

Permalink
Fix small issue with the pongChan
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Aug 22, 2017
1 parent ef99602 commit d553264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -168,7 +168,7 @@ func (c *Client) maybeStartPingLoop(wg *sync.WaitGroup, exiting chan struct{}) {
// Each time we get a tick, we send off a ping and start a
// goroutine to handle the pong.
timestamp := time.Now().Unix()
pongChan := make(chan struct{})
pongChan := make(chan struct{}, 1)
pingHandlers[fmt.Sprintf("%d", timestamp)] = pongChan
wg.Add(1)
go c.handlePing(timestamp, pongChan, wg, exiting)
Expand Down

0 comments on commit d553264

Please sign in to comment.