lib/yahns/queue_epoll.rb in yahns-1.12.5 vs lib/yahns/queue_epoll.rb in yahns-1.13.0
- old
+ new
@@ -42,9 +42,10 @@
def worker_thread(logger, max_events)
Thread.new do
thr_init
begin
epoll_wait(max_events) do |_, io| # don't care for flags for now
+ next if io.closed?
# Note: we absolutely must not do anything with io after
# we've called epoll_ctl on it, io is exclusive to this
# thread only until epoll_ctl is called on it.
case rv = io.yahns_step