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
98e7fc1e
Commit
98e7fc1e
authored
Feb 15, 2019
by
Matt Joiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflow comments
parent
b3377755
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
swarm.go
swarm.go
+4
-4
No files found.
swarm.go
View file @
98e7fc1e
...
@@ -121,8 +121,8 @@ func (s *Swarm) teardown() error {
...
@@ -121,8 +121,8 @@ func (s *Swarm) teardown() error {
s
.
conns
.
m
=
nil
s
.
conns
.
m
=
nil
s
.
conns
.
Unlock
()
s
.
conns
.
Unlock
()
// Lots of go
routines but we might as well do this in parallel. We want
// Lots of goroutines but we might as well do this in parallel. We want
to shut down as fast as
//
to shut down as fast as
possible.
// possible.
for
l
:=
range
listeners
{
for
l
:=
range
listeners
{
go
func
(
l
transport
.
Listener
)
{
go
func
(
l
transport
.
Listener
)
{
...
@@ -148,8 +148,8 @@ func (s *Swarm) teardown() error {
...
@@ -148,8 +148,8 @@ func (s *Swarm) teardown() error {
return
nil
return
nil
}
}
// AddAddrFilter adds a multiaddr filter to the set of filters the swarm will
// AddAddrFilter adds a multiaddr filter to the set of filters the swarm will
use to determine which
//
use to determine which
addresses not to dial to.
// addresses not to dial to.
func
(
s
*
Swarm
)
AddAddrFilter
(
f
string
)
error
{
func
(
s
*
Swarm
)
AddAddrFilter
(
f
string
)
error
{
m
,
err
:=
mafilter
.
NewMask
(
f
)
m
,
err
:=
mafilter
.
NewMask
(
f
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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