From ca618b1b12c0608940f2bf5e657cd66278c1f2c4 Mon Sep 17 00:00:00 2001 From: David Kellum Date: Thu, 31 Mar 2016 16:42:51 -0700 Subject: [PATCH] Follow local conventions better --- lib/puma/binder.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/puma/binder.rb b/lib/puma/binder.rb index d86113f6..34ad879e 100644 --- a/lib/puma/binder.rb +++ b/lib/puma/binder.rb @@ -55,8 +55,7 @@ module Puma fd, url = v.split(":", 2) @inherited_fds[url] = fd.to_i remove << k - end - if k == 'LISTEN_FDS' && ENV['LISTEN_PID'].to_i == $$ + elsif k == 'LISTEN_FDS' && ENV['LISTEN_PID'].to_i == $$ v.to_i.times do |num| fd = num + 3 sock = TCPServer.for_fd(fd) @@ -72,8 +71,7 @@ module Puma @inherited_fds[url] = sock @events.debug "Registered #{url} for inheriting from LISTEN_FDS" end - ENV.delete k - ENV.delete 'LISTEN_PID' + remove << k << 'LISTEN_PID' end end