Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jan 5, 2025
2 parents 979c8df + 7fecb07 commit 2502094
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@

## OpenOS fixes/improvements

* [#3714] Fix an OpenOS 1.8.0 regression causing event.pullFiltered() to effectively ignore filter timeouts.
* [#3727] Fix an exception handler bug in process.lua, uncovered by fixing recursive xpcall() handling in 1.8.4.

## List of contributors

asie, charagarland, HfSr, Timothé GRISOT
asie, charagarland, DragDen, HfSr, Timothé GRISOT
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ function event.pullFiltered(...)
filter = args[2]
end

local deadline = computer.uptime() + (seconds or math.huge)
repeat
local signal = table.pack(computer.pullSignal(seconds))
local waitTime = deadline - computer.uptime()
if waitTime <= 0 then
break
end
local signal = table.pack(computer.pullSignal(waitTime))
if signal.n > 0 then
if not (seconds or filter) or filter == nil or filter(table.unpack(signal, 1, signal.n)) then
return table.unpack(signal, 1, signal.n)
Expand Down

0 comments on commit 2502094

Please sign in to comment.