fix Client.conn data race during pong; closes #11
This commit is contained in:
parent
2e1546f204
commit
e46d210b5d
@ -113,7 +113,9 @@ func handlePING(c *Client, e Event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handlePONG(c *Client, e Event) {
|
func handlePONG(c *Client, e Event) {
|
||||||
|
c.conn.mu.Lock()
|
||||||
c.conn.lastPong = time.Now()
|
c.conn.lastPong = time.Now()
|
||||||
|
c.conn.mu.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleJOIN ensures that the state has updated users and channels.
|
// handleJOIN ensures that the state has updated users and channels.
|
||||||
|
Loading…
Reference in New Issue
Block a user