Merge pull request #106 from slackhq/fix-listen-host

fix listen.host
This commit is contained in:
Wade Simmons 2019-12-17 12:11:13 -05:00 committed by GitHub
commit 0d1da7579e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ func NewListener(ip string, port int, multi bool) (*udpConn, error) {
return nil, fmt.Errorf("unable to set SO_REUSEPORT: %s", err)
}
if err = unix.Bind(fd, &unix.SockaddrInet4{Port: port}); err != nil {
if err = unix.Bind(fd, &unix.SockaddrInet4{Addr: lip, Port: port}); err != nil {
return nil, fmt.Errorf("unable to bind to socket: %s", err)
}