Skip to content

Commit

Permalink
Merge pull request bigbluebutton#19916 from gustavotrott/test-graphql…
Browse files Browse the repository at this point in the history
…-reconnecting

refactor (graphql-middleware): Increase Ws Read Limit to 10MB (necessary for annotations)
  • Loading branch information
gustavotrott authored Mar 27, 2024
2 parents f684b7d + 6fca6c2 commit 638a327
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bbb-graphql-middleware/internal/hascli/conn/writer/writer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package writer

import (
"context"
"errors"
"github.com/iMDT/bbb-graphql-middleware/internal/common"
"github.com/iMDT/bbb-graphql-middleware/internal/msgpatch"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -144,7 +146,9 @@ RangeLoop:
log.Tracef("sending to hasura: %v", fromBrowserMessageAsMap)
err := wsjson.Write(hc.Context, hc.Websocket, fromBrowserMessageAsMap)
if err != nil {
log.Errorf("error on write (we're disconnected from hasura): %v", err)
if !errors.Is(err, context.Canceled) {
log.Errorf("error on write (we're disconnected from hasura): %v", err)
}
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion bbb-graphql-middleware/internal/websrv/connhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func ConnectionHandler(w http.ResponseWriter, r *http.Request) {
}

browserWsConn, err := websocket.Accept(w, r, &acceptOptions)
browserWsConn.SetReadLimit(999999)
browserWsConn.SetReadLimit(9999999) //10MB
if err != nil {
log.Errorf("error: %v", err)
}
Expand Down

0 comments on commit 638a327

Please sign in to comment.