Skip to content

Commit

Permalink
fix: silence logs if port doesn't change
Browse files Browse the repository at this point in the history
  • Loading branch information
Michsior14 committed Nov 26, 2023
1 parent fcf5210 commit 982fb61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ func main() {
if portMapping.Port == 0 {
err = errors.New("empty port")
log.Printf("new port is not yet assigned, %v", err)
} else if portMapping.Port == previousExternalPort {
log.Printf("external port is unchanged: %d", portMapping.Port)
} else {
} else if portMapping.Port != previousExternalPort {
log.Printf("external port changed to: %d", portMapping.Port)

transmissionPeerPort := int64(portMapping.Port)
Expand Down

0 comments on commit 982fb61

Please sign in to comment.