Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
41728571
Unverified
Commit
41728571
authored
Sep 29, 2016
by
Jakub Sztandera
Browse files
fix locking issue introduced in
90eeff42
parent
90e9b615
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/nat/nat.go
View file @
41728571
...
...
@@ -177,7 +177,7 @@ func (nat *NAT) establishMapping(m *mapping) {
// Some hardware does not support mappings with timeout, so try that
newport
,
err
=
nat
.
nat
.
AddPortMapping
(
m
.
Protocol
(),
m
.
InternalPort
(),
comment
,
0
)
}
nat
.
natmu
.
L
ock
()
nat
.
natmu
.
Unl
ock
()
failure
:=
func
()
{
m
.
setExternalPort
(
0
)
// clear mapping
...
...
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