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-swarm
Commits
b3377755
Commit
b3377755
authored
Feb 15, 2019
by
Matt Joiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve context use
parent
94b3bc9b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
limiter.go
limiter.go
+1
-6
swarm_listen.go
swarm_listen.go
+3
-1
No files found.
limiter.go
View file @
b3377755
...
...
@@ -27,12 +27,7 @@ type dialJob struct {
}
func
(
dj
*
dialJob
)
cancelled
()
bool
{
select
{
case
<-
dj
.
ctx
.
Done
()
:
return
true
default
:
return
false
}
return
dj
.
ctx
.
Err
()
!=
nil
}
func
(
dj
*
dialJob
)
dialTimeout
()
time
.
Duration
{
...
...
swarm_listen.go
View file @
b3377755
...
...
@@ -74,7 +74,9 @@ func (s *Swarm) AddListenAddr(a ma.Multiaddr) error {
for
{
c
,
err
:=
list
.
Accept
()
if
err
!=
nil
{
log
.
Warningf
(
"swarm listener accept error: %s"
,
err
)
if
s
.
ctx
.
Err
()
==
nil
{
log
.
Errorf
(
"swarm listener accept error: %s"
,
err
)
}
return
}
log
.
Debugf
(
"swarm listener accepted connection: %s"
,
c
)
...
...
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