feat(live): just wanted to checkout how far I got on the websocket data source

This commit is contained in:
Torkel Ödegaard
2016-12-20 16:09:04 +01:00
parent e81e4ad06f
commit b7827962dc
6 changed files with 29 additions and 21 deletions
+1
View File
@@ -48,6 +48,7 @@ func (c *connection) readPump() {
h.unregister <- c
c.ws.Close()
}()
c.ws.SetReadLimit(maxMessageSize)
c.ws.SetReadDeadline(time.Now().Add(pongWait))
c.ws.SetPongHandler(func(string) error { c.ws.SetReadDeadline(time.Now().Add(pongWait)); return nil })