Skip to content

Commit

Permalink
Fix: windows arm7 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Nov 8, 2021
1 parent b56d350 commit c9be614
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component/dialer/bind_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ func bindIfaceToDialer(ifaceName string, dialer *net.Dialer, network string, des
return nil
}

local := 0
local := int64(0)
if dialer.LocalAddr != nil {
_, port, err := net.SplitHostPort(dialer.LocalAddr.String())
if err == nil {
local, _ = strconv.ParseInt(port, 10, 16)
}
}

addr, err := lookupLocalAddr(ifaceName, network, destination, local)
addr, err := lookupLocalAddr(ifaceName, network, destination, int(local))
if err != nil {
return err
}
Expand All @@ -84,7 +84,7 @@ func bindIfaceToListenConfig(ifaceName string, _ *net.ListenConfig, network, add

local, _ := strconv.ParseInt(port, 10, 16)

addr, err := lookupLocalAddr(ifaceName, network, nil, local)
addr, err := lookupLocalAddr(ifaceName, network, nil, int(local))
if err != nil {
return "", err
}
Expand Down

0 comments on commit c9be614

Please sign in to comment.