class Puma::Server
def notify_safely(message)
def notify_safely(message) @notify << message rescue IOError, NoMethodError, Errno::EPIPE, Errno::EBADF # The server, in another thread, is shutting down rescue RuntimeError => e # Temporary workaround for https://bugs.ruby-lang.org/issues/13239 if e.message.include?('IOError') # ignore else raise e end end