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
c51b5c9f
Commit
c51b5c9f
authored
Jun 12, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1367 from ipfs/wantmanager-cleanup
select with context when sending on channels
parents
d06b99b3
468e7655
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 @
c51b5c9f
...
...
@@ -181,11 +181,17 @@ func (mq *msgQueue) doWork(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