From 4ba131592c3053480897d66ce0d4a5cef0d52eac Mon Sep 17 00:00:00 2001 From: Camden Narzt <6243207+CamJN@users.noreply.github.com> Date: Sun, 18 Oct 2026 20:39:13 +0200 Subject: [PATCH] Handle trying to stop nginx which is already shutting down Added handling for Errno::ECONNRESET in daemon_controller. Signed-off-by: Camden Narzt <6243207+CamJN@users.noreply.github.com> --- lib/daemon_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/daemon_controller.rb b/lib/daemon_controller.rb index 9e191b5..4206ce9 100644 --- a/lib/daemon_controller.rb +++ b/lib/daemon_controller.rb @@ -706,7 +706,10 @@ def ping_socket(socket_domain, sockaddr) end end true - rescue Errno::ECONNREFUSED, Errno::ENOENT + rescue Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ENOENT + # ECONNRESET: the connection landed in the listen backlog of a + # server that closed its listening socket before accepting it, + # e.g. because it is shutting down. false ensure socket.close if socket