Use "ignore incoming messages" code from the gorilla websocket documentation.

This commit is contained in:
Sascha L. Teichmann 2015-03-03 01:33:12 +01:00
parent f943919ee6
commit 7249a60043

View File

@ -105,7 +105,7 @@ func (c *connection) reader() {
defer c.ws.Close()
for {
// Just read the message and ignore it.
if _, _, err := c.ws.ReadMessage(); err != nil {
if _, _, err := c.ws.NextReader(); err != nil {
break
}
}