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-autonat
Commits
9f837210
Commit
9f837210
authored
Aug 03, 2020
by
Will Scott
Committed by
Adin Schmahmann
Aug 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
static nat shouldn't call host.Addrs()
avoid potential call loop
parent
411d9e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
autonat.go
autonat.go
+0
-4
No files found.
autonat.go
View file @
9f837210
...
...
@@ -443,9 +443,5 @@ func (s *StaticAutoNAT) PublicAddr() (ma.Multiaddr, error) {
if
s
.
reachability
!=
network
.
ReachabilityPublic
{
return
nil
,
errors
.
New
(
"NAT status is not public"
)
}
addrs
:=
s
.
host
.
Addrs
()
if
len
(
addrs
)
>
0
{
return
s
.
host
.
Addrs
()[
0
],
nil
}
return
nil
,
errors
.
New
(
"No available address"
)
}
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