Skip to content

Commit

Permalink
ci: handle EBUSY for udp
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Jun 8, 2024
1 parent 8d334e5 commit 572e67a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test-udp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,14 @@ return require('lib/tap')(function (test)
timeout:close()
else
-- udp_set_source_membership added in 1.32.0
-- Temporarily disabled on macOS CI, see https://github.com/luvit/luv/issues/704
if uvVersionGEQ("1.32.0") and uv.os_getenv("RUNNER_OS") ~= "macOS" then
if uvVersionGEQ("1.32.0") then
local source_addr = addr.ip
assert(server:set_membership(multicast_addr, interface_addr, "leave"))
_, err, errname = server:set_source_membership(multicast_addr, interface_addr, source_addr, "join")
-- handle 'EBUSY' error accidentally on macOS macOS CI, see https://github.com/luvit/luv/issues/704
while errname == 'EBUSY' do
_, err, errname = server:set_source_membership(multicast_addr, interface_addr, source_addr, "join")
end
if errname == "ENOSYS" then
-- not all systems support set_source_membership, so rejoin the previous group and continue on
assert(server:set_membership(multicast_addr, interface_addr, "join"))
Expand Down

0 comments on commit 572e67a

Please sign in to comment.