Don't restrict size of messages at the websocket layer

This commit is contained in:
James Mills 2018-05-08 00:15:23 -07:00
parent 5cf4c1430a
commit 6ce5fb7104
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
2 changed files with 0 additions and 8 deletions

View File

@ -36,9 +36,6 @@ const (
// Send pings to peer with this period. Must be less than pongWait.
pingPeriod = (pongWait * 9) / 10
// Maximum message size allowed from peer.
maxMessageSize = 2048
)
var (
@ -275,7 +272,6 @@ func (s *Subscriber) connect() {
func (s *Subscriber) readLoop() {
var msg *msgbus.Message
s.conn.SetReadLimit(maxMessageSize)
s.conn.SetReadDeadline(time.Now().Add(pongWait))
s.conn.SetPongHandler(func(message string) error {

View File

@ -27,9 +27,6 @@ const (
// Send pings to peer with this period. Must be less than pongWait.
pingPeriod = (pongWait * 9) / 10
// Maximum message size allowed from peer.
maxMessageSize = 2048
)
// TODO: Make this configurable?
@ -505,7 +502,6 @@ func (c *Client) readPump() {
c.conn.Close()
}()
c.conn.SetReadLimit(maxMessageSize)
c.conn.SetReadDeadline(time.Now().Add(pongWait))
c.conn.SetPongHandler(func(message string) error {