Skip to content

Commit

Permalink
Merge pull request #123 from libp2p/fix/nat/lock
Browse files Browse the repository at this point in the history
Fix locking issue introduced in 90eeff4
  • Loading branch information
whyrusleeping committed Sep 29, 2016
2 parents 90e9b61 + 4172857 commit 67ed3ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/nat/nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.Lock()
nat.natmu.Unlock()

failure := func() {
m.setExternalPort(0) // clear mapping
Expand Down

0 comments on commit 67ed3ff

Please sign in to comment.