Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix-server-shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
TwP committed May 29, 2015
2 parents 8982d3e + 55d00ab commit bdfed8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/servolux/child.rb
Expand Up @@ -121,7 +121,7 @@ def stop
end

kill if alive?
@io.close rescue nil
@io.close unless @io.nil? || @io.closed?
@io = nil
self
end
Expand Down
6 changes: 3 additions & 3 deletions lib/servolux/daemon.rb
Expand Up @@ -363,9 +363,9 @@ def exec( *args )

skip = [STDIN, STDOUT, STDERR]
skip << @piper.socket if @piper
ObjectSpace.each_object(IO) { |obj|
next if skip.include? obj
obj.close rescue nil
ObjectSpace.each_object(IO) { |io|
next if skip.include? io
io.close unless io.closed?
}

before_exec.call if before_exec.respond_to? :call
Expand Down
2 changes: 1 addition & 1 deletion lib/servolux/piper.rb
Expand Up @@ -153,7 +153,7 @@ def initialize( *args )
# @return [Piper] self
#
def close
@socket.close rescue nil
@socket.close unless @socket.closed?
self
end

Expand Down

0 comments on commit bdfed8f

Please sign in to comment.