Skip to content

Commit

Permalink
Update nat.go
Browse files Browse the repository at this point in the history
  • Loading branch information
arberiii committed Jan 12, 2020
1 parent cdec75a commit 33f0983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/net/nat/nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (nat *NAT) rmMapping(m *mapping) {
nat.mappingmu.Unlock()
}

// NewMapping attemps to construct a mapping on protocol and internal port
// NewMapping attempts to construct a mapping on protocol and internal port
// It will also periodically renew the mapping until the returned Mapping
// -- or its parent NAT -- is Closed.
//
Expand Down Expand Up @@ -183,7 +183,7 @@ func (nat *NAT) establishMapping(m *mapping) {
if err != nil || newport == 0 {
m.setExternalPort(0) // clear mapping
// TODO: log.Event
log.Warningf("failed to establish port mapping: %s", err)
log.Warnf("failed to establish port mapping: %s", err)
// we do not close if the mapping failed,
// because it may work again next time.
return
Expand Down

0 comments on commit 33f0983

Please sign in to comment.