remove useless SO_REUSEPORT (#422)

(https://github.com/bluenviron/mediamtx/issues/2133)
This commit is contained in:
Alessandro Ros
2023-09-15 22:32:20 +02:00
committed by GitHub
parent 1b0ece8270
commit e6f7c4dea4
3 changed files with 3 additions and 28 deletions

View File

@@ -72,13 +72,6 @@ func NewSingleConn(
return nil, err
}
const SO_REUSEPORT = 0x0f //nolint:revive
err = syscall.SetsockoptInt(sock, syscall.SOL_SOCKET, SO_REUSEPORT, 1)
if err != nil {
syscall.Close(sock) //nolint:errcheck
return nil, err
}
err = syscall.SetsockoptString(sock, syscall.SOL_SOCKET, syscall.SO_BINDTODEVICE, intf.Name)
if err != nil {
syscall.Close(sock) //nolint:errcheck