# HG changeset patch # User Kim Alvefur # Date 1632141738 -7200 # Node ID fe0cdbad19c35a3c48c1119e72453510513ccaad # Parent 49cfd3628d9df7f265da25da78e3b10c06a4f66e net.server_epoll: Close sockets added after shutdown signal (fixes #1670) This should ensure that sockets get closed even if they are added after the quit signal. Otherwise they may keep the server alive. diff -r 49cfd3628d9d -r fe0cdbad19c3 net/server_epoll.lua --- a/net/server_epoll.lua Sat Sep 11 22:26:50 2021 +0200 +++ b/net/server_epoll.lua Mon Sep 20 14:42:18 2021 +0200 @@ -743,6 +743,12 @@ if quit then quitting = "quitting"; closeall(); + addtimer(1, function () + if quitting then + closeall(); + return 1; + end + end); else quitting = nil; end