good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
nhooyr
websocket
Commits
454aee86
Unverified
Commit
454aee86
authored
Oct 25, 2023
by
Anmol Sethi
Browse files
Options
Downloads
Patches
Plain Diff
ws_js.go: Disable read limit on -1
Whoops, updates #254 and closes #410
parent
b4e4f4f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ws_js.go
+3
-2
3 additions, 2 deletions
ws_js.go
with
3 additions
and
2 deletions
ws_js.go
+
3
−
2
View file @
454aee86
...
@@ -138,7 +138,8 @@ func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) {
...
@@ -138,7 +138,8 @@ func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
0
,
nil
,
fmt
.
Errorf
(
"failed to read: %w"
,
err
)
return
0
,
nil
,
fmt
.
Errorf
(
"failed to read: %w"
,
err
)
}
}
if
int64
(
len
(
p
))
>
c
.
msgReadLimit
.
Load
()
{
readLimit
:=
c
.
msgReadLimit
.
Load
()
if
readLimit
>=
0
&&
int64
(
len
(
p
))
>
readLimit
{
err
:=
fmt
.
Errorf
(
"read limited at %v bytes"
,
c
.
msgReadLimit
.
Load
())
err
:=
fmt
.
Errorf
(
"read limited at %v bytes"
,
c
.
msgReadLimit
.
Load
())
c
.
Close
(
StatusMessageTooBig
,
err
.
Error
())
c
.
Close
(
StatusMessageTooBig
,
err
.
Error
())
return
0
,
nil
,
err
return
0
,
nil
,
err
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment