rpc: add separate size limit for websocket (#22385)
This makes the WebSocket message size limit independent of the limit used for HTTP requests. The new limit for WebSocket messages is 15MB.
This commit is contained in:
@ -20,6 +20,7 @@ import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
@ -194,3 +195,12 @@ func (s *notificationTestService) HangSubscription(ctx context.Context, val int)
|
||||
}()
|
||||
return subscription, nil
|
||||
}
|
||||
|
||||
// largeRespService generates arbitrary-size JSON responses.
|
||||
type largeRespService struct {
|
||||
length int
|
||||
}
|
||||
|
||||
func (x largeRespService) LargeResp() string {
|
||||
return strings.Repeat("x", x.length)
|
||||
}
|
||||
|
Reference in New Issue
Block a user