Skip to content

Commit 6511bc3

Browse files
Add sock option SO_REUSEPORT to allow udp multicast on macos
1 parent 5d62394 commit 6511bc3

File tree

1 file changed

+1
-0
lines changed
  • can/interfaces/udp_multicast

1 file changed

+1
-0
lines changed

can/interfaces/udp_multicast/bus.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def _create_socket(self, address_family: socket.AddressFamily) -> socket.socket:
274274

275275
# Allow multiple programs to access that address + port
276276
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
277+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
277278

278279
# set how to receive timestamps
279280
try:

0 commit comments

Comments
 (0)