fix bind address in linux

pull/1291/head
Darien Raymond 6 years ago
parent d55fbd7f8d
commit 07aa486d43
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -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…
Cancel
Save