Skip to content

Commit

Permalink
Show better debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
pufferffish committed Apr 13, 2024
1 parent 728438c commit 1e0391c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/wireproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ func lock(stage string) {
func extractPort(addr string) uint16 {
_, portStr, err := net.SplitHostPort(addr)
if err != nil {
panic(err)
panic(fmt.Errorf("failed to extract port from %s: %w", addr, err))
}

port, err := strconv.Atoi(portStr)
if err != nil {
panic(err)
panic(fmt.Errorf("failed to extract port from %s: %w", addr, err))
}

return uint16(port)
Expand Down

0 comments on commit 1e0391c

Please sign in to comment.