Set higher websocket read limit
This commit is contained in:
parent
0d556e1ad7
commit
25e5c06246
4
entry.go
4
entry.go
|
@ -126,6 +126,8 @@ func (c *channelEntry) getPreviousBlocks() {
|
|||
c.PreviousBlocks = result
|
||||
}
|
||||
|
||||
const readLimit = 8 * 1024 * 1024
|
||||
|
||||
func (c *channelEntry) openWebSocket() {
|
||||
if c.ApiEndpoint == "" {
|
||||
c.Ws.Store(nil)
|
||||
|
@ -141,6 +143,7 @@ func (c *channelEntry) openWebSocket() {
|
|||
c.Ws.Store(nil)
|
||||
return
|
||||
}
|
||||
conn.SetReadLimit(readLimit)
|
||||
c.Ws.Store(conn)
|
||||
} else {
|
||||
conn, _, err := websocket.Dial(ctx, fmt.Sprintf("ws://%s/api/events", u.Host), nil)
|
||||
|
@ -148,6 +151,7 @@ func (c *channelEntry) openWebSocket() {
|
|||
c.Ws.Store(nil)
|
||||
return
|
||||
}
|
||||
conn.SetReadLimit(readLimit)
|
||||
c.Ws.Store(conn)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue