Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kad-dht
Commits
e7519fa5
Commit
e7519fa5
authored
Jun 15, 2016
by
Jeromy Johnson
Committed by
GitHub
Jun 15, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2856 from ipfs/fix/send-msg-race
pass reference to reader instead of using the one on the object
parents
478d3251
23050f9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dht_net.go
dht_net.go
+3
-3
No files found.
dht_net.go
View file @
e7519fa5
...
...
@@ -228,9 +228,9 @@ func (ms *messageSender) SendRequest(ctx context.Context, pmes *pb.Message) (*pb
func
(
ms
*
messageSender
)
ctxReadMsg
(
ctx
context
.
Context
,
mes
*
pb
.
Message
)
error
{
errc
:=
make
(
chan
error
,
1
)
go
func
()
{
errc
<-
ms
.
r
.
ReadMsg
(
mes
)
}()
go
func
(
r
ggio
.
ReadCloser
)
{
errc
<-
r
.
ReadMsg
(
mes
)
}(
ms
.
r
)
select
{
case
err
:=
<-
errc
:
...
...
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