mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
fix bind address in linux
This commit is contained in:
parent
d55fbd7f8d
commit
07aa486d43
@ -14,6 +14,11 @@ const (
|
||||
)
|
||||
|
||||
func bindAddr(fd uintptr, address net.Address, port net.Port) error {
|
||||
err = syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1)
|
||||
if err != nil {
|
||||
return newError("failed to set resuse_addr").Base(err).AtWarning()
|
||||
}
|
||||
|
||||
var sockaddr syscall.Sockaddr
|
||||
|
||||
switch address.Family() {
|
||||
|
Loading…
Reference in New Issue
Block a user