this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

enforce a maximum WebSocket frame size

+5
+5
cmd/relay/stream/consumer.go
··· 15 15 "github.com/prometheus/client_golang/prometheus" 16 16 ) 17 17 18 + const MaxMessageBytes = 5_000_000 19 + 18 20 type RepoStreamCallbacks struct { 19 21 RepoCommit func(evt *comatproto.SyncSubscribeRepos_Commit) error 20 22 RepoSync func(evt *comatproto.SyncSubscribeRepos_Sync) error ··· 152 154 } 153 155 } 154 156 }() 157 + 158 + // global maximum WebSocket message size; connection will drop if exceeded 159 + con.SetReadLimit(MaxMessageBytes) 155 160 156 161 con.SetPingHandler(func(message string) error { 157 162 err := con.WriteControl(websocket.PongMessage, []byte(message), time.Now().Add(time.Second*60))