mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
Show better debug message
This commit is contained in:
parent
728438cc33
commit
1e0391c281
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue