fix Client.conn data race during pong; closes #11

This commit is contained in:
Liam Stanley 2018-04-06 21:29:34 -04:00
parent 2e1546f204
commit e46d210b5d

View File

@ -113,7 +113,9 @@ func handlePING(c *Client, e Event) {
}
func handlePONG(c *Client, e Event) {
c.conn.mu.Lock()
c.conn.lastPong = time.Now()
c.conn.mu.Unlock()
}
// handleJOIN ensures that the state has updated users and channels.