Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
websocket maxMessageSize increased to 16384
Browse files Browse the repository at this point in the history
  • Loading branch information
FeodorFitsner committed Nov 30, 2020
1 parent 99301ad commit b570a07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/page/connection/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
pingPeriod = (pongWait * 9) / 10

// Maximum message size allowed from peer.
maxMessageSize = 512
maxMessageSize = 16384
)

type WebSocket struct {
Expand Down Expand Up @@ -62,7 +62,7 @@ func (c *WebSocket) readLoop(readHandler ReadMessageHandler) {
for {
_, message, err := c.conn.ReadMessage()
if err != nil {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) || err == websocket.ErrReadLimit {
log.Printf("error: %v", err)
}
break
Expand Down

0 comments on commit b570a07

Please sign in to comment.