Skip to content

Commit

Permalink
fix #3714
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Jan 5, 2025
1 parent e8595d2 commit 7fecb07
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 @@ -9,8 +9,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 7fecb07

Please sign in to comment.