Skip to content

Commit

Permalink
fix: don't try to release not-bound ports (ddev#6612)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay authored Oct 14, 2024
1 parent d74fbf7 commit aeb5ee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/ddevapp/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ func GetRouterBoundPorts() ([]uint16, error) {
}

for _, p := range r.Ports {
boundPorts = append(boundPorts, p.PublicPort)
if p.PublicPort != 0 {
boundPorts = append(boundPorts, p.PublicPort)
}
}
return boundPorts, nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/netutil/netutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func IsPortActive(port string) bool {
}
}
// Otherwise, hmm, something else happened. It's not a fatal but can be reported.
util.Warning("Unable to properly check port status: %v", oe)
util.Warning("Unable to properly check port status for %s:%s: err=%v", dockerIP, port, err)
return false
}

Expand Down

0 comments on commit aeb5ee0

Please sign in to comment.