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