net.server_epoll: Fix to preserve ids of readded timers

Likely affected rescheduling but have no reports of this.

After readding a timer, it would have been issued a new id. Rescheduling
would use the previous id, thus not working.
This commit is contained in:
Kim Alvefur 2021-08-31 12:58:38 +02:00
parent 5f69d4a129
commit 6be7cf935f

View file

@ -122,8 +122,8 @@ local function runtimers(next_delay, min_wait)
end
if readd then
for _, timer in pairs(readd) do
timers:insert(timer, timer[1]);
for id, timer in pairs(readd) do
timers:insert(timer, timer[1], id);
end
peek = timers:peek();
end