Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
496f05cf
Unverified
Commit
496f05cf
authored
3 years ago
by
s7v7nislands
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc: fix defer in test (#24490)
Co-authored-by:
Felix Lange
<
fjl@twurst.com
>
parent
8f66ea37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
server_test.go
rpc/server_test.go
+3
-1
No files found.
rpc/server_test.go
View file @
496f05cf
...
...
@@ -134,7 +134,7 @@ func TestServerShortLivedConn(t *testing.T) {
if
err
!=
nil
{
t
.
Fatal
(
"can't dial:"
,
err
)
}
defer
conn
.
Close
()
conn
.
SetDeadline
(
deadline
)
// Write the request, then half-close the connection so the server stops reading.
conn
.
Write
([]
byte
(
request
))
...
...
@@ -142,6 +142,8 @@ func TestServerShortLivedConn(t *testing.T) {
// Now try to get the response.
buf
:=
make
([]
byte
,
2000
)
n
,
err
:=
conn
.
Read
(
buf
)
conn
.
Close
()
if
err
!=
nil
{
t
.
Fatal
(
"read error:"
,
err
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment