Skip to content

Commit

Permalink
server: fix reading with multicast on macOS (bluenviron/mediamtx#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Apr 21, 2022
1 parent 1e612f2 commit aa09a71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions serverudpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ func newServerUDPListener(

for _, intf := range intfs {
if (intf.Flags & net.FlagMulticast) != 0 {
err := p.JoinGroup(&intf, &net.UDPAddr{IP: listenIP})
if err != nil {
return nil, err
}
// do not check for errors.
// on macOS, there are interfaces with the multicast flag but
// without support for multicast, that makes this function fail.
p.JoinGroup(&intf, &net.UDPAddr{IP: listenIP})
}
}

Expand Down

0 comments on commit aa09a71

Please sign in to comment.