-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I noticed high cpu usage on subscriptions after 30 seconds when no new data comes in. The reason is to be found here:
client/transport/wshandler.go
func (wh *WebsocketHandler) ReadJSON(v interface{}) error {
ctx, cancel := context.WithTimeout(wh.ctx, wh.timeout)
defer cancel()
return wsjson.Read(ctx, wh.Conn, v)
}When I use no timeout, cpu usage stays low:
func (wh *WebsocketHandler) ReadJSON(v interface{}) error {
return wsjson.Read(wh.ctx, wh.Conn, v)
}Not sure if this an issue per se as you can provide your own WebsocketHandler anyways.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed