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
dms3
go-unixfs
Commits
239e8239
Commit
239e8239
authored
Jan 20, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p2p/test/reconnect: fixed race condition
parent
0b9bef1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
p2p/test/reconnects/reconnect_test.go
p2p/test/reconnects/reconnect_test.go
+5
-5
No files found.
p2p/test/reconnects/reconnect_test.go
View file @
239e8239
...
...
@@ -188,16 +188,16 @@ func SubtestConnSendDisc(t *testing.T, hosts []host.Host) {
defer
wg
.
Done
()
go
sF
(
s
)
log
.
Debugf
(
"getting handle %d"
,
i
)
log
.
Debugf
(
"getting handle %d"
,
j
)
sc
:=
<-
ss
// wait to get handle.
log
.
Debugf
(
"spawning worker %d"
,
i
)
log
.
Debugf
(
"spawning worker %d"
,
j
)
for
i
:=
0
;
i
<
numMsgs
;
i
++
{
for
k
:=
0
;
k
<
numMsgs
;
k
++
{
sc
.
send
<-
struct
{}{}
<-
sc
.
sent
log
.
Debugf
(
"%d sent %d"
,
j
,
i
)
log
.
Debugf
(
"%d sent %d"
,
j
,
k
)
<-
sc
.
read
log
.
Debugf
(
"%d read %d"
,
j
,
i
)
log
.
Debugf
(
"%d read %d"
,
j
,
k
)
}
sc
.
close_
<-
struct
{}{}
<-
sc
.
closed
...
...
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