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-bitswap
Commits
468e7655
Commit
468e7655
authored
Jun 12, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
select with context when sending on channels
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
8cb50134
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
wantmanager.go
wantmanager.go
+8
-2
No files found.
wantmanager.go
View file @
468e7655
...
...
@@ -168,11 +168,17 @@ func (mq *msgQueue) runQueue(ctx context.Context) {
}
func
(
pm
*
WantManager
)
Connected
(
p
peer
.
ID
)
{
pm
.
connect
<-
p
select
{
case
pm
.
connect
<-
p
:
case
<-
pm
.
ctx
.
Done
()
:
}
}
func
(
pm
*
WantManager
)
Disconnected
(
p
peer
.
ID
)
{
pm
.
disconnect
<-
p
select
{
case
pm
.
disconnect
<-
p
:
case
<-
pm
.
ctx
.
Done
()
:
}
}
// TODO: use goprocess here once i trust 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