good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrpc
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
open
jrpc
Commits
0886777e
"git@gfx.cafe:open/bor.git" did not exist on "105922180fd97ed34e090a395c62e0288a6aa424"
Verified
Commit
0886777e
authored
Oct 28, 2023
by
a
Browse files
Options
Downloads
Patches
Plain Diff
add comments
parent
d5c5714c
No related branches found
No related tags found
1 merge request
!23
Whatthefuck
Pipeline
#30100
failed
Oct 28, 2023
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/server/server.go
+5
-1
5 additions, 1 deletion
pkg/server/server.go
with
5 additions
and
1 deletion
pkg/server/server.go
+
5
−
1
View file @
0886777e
...
...
@@ -116,7 +116,7 @@ func (s *Server) serveBatch(ctx context.Context,
cr
:
r
,
}
rs
=
append
(
rs
,
rw
)
// a nil incoming message means
an empty response
// a nil incoming message means
return an invalid request.
if
v
==
nil
{
v
=
&
codec
.
Message
{
ID
:
codec
.
NewNullIDPtr
()}
rw
.
err
=
codec
.
NewInvalidRequestError
(
"invalid request"
)
...
...
@@ -124,12 +124,16 @@ func (s *Server) serveBatch(ctx context.Context,
rw
.
msg
=
v
rw
.
msg
.
ExtraFields
=
codec
.
ExtraFields
{}
rw
.
msg
.
Error
=
nil
// zero length method is always invalid request
if
len
(
v
.
Method
)
==
0
{
// assume if the method is not there AND the id is not there that it's an invalid REQUEST not notification
// this makes sure we add 1 to totalRequests
if
v
.
ID
==
nil
{
v
.
ID
=
codec
.
NewNullIDPtr
()
}
rw
.
err
=
codec
.
NewInvalidRequestError
(
"invalid request"
)
}
// requests and malformed requests both count as requests
if
v
.
ID
!=
nil
{
totalRequests
+=
1
}
...
...
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