Skip to content

Commit

Permalink
Trying things in Appveyor...
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus committed Jul 19, 2019
1 parent 7bf16e4 commit 623203f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/puma/minissl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,19 @@ def read_nonblock(size, *_)
output = engine_read_all
return output if output

data = @socket.read_nonblock(size)
begin
data = @socket.read_nonblock(size)
rescue Errno::ECONNABORTED => e
raise "Connection aborted (#{e.inspect})"
rescue Errno::EAGAIN => e
raise "EAGAIN (#{e.inspect})"
rescue Errno::EWOULDBLOCK => e
raise "EWOULDBLOCK (#{e.inspect})"
rescue Exception => e
raise "Other exception (#{e.class.name}: #{e.inspect})"
end

return nil unless data
return nil if data.nil?

@engine.inject(data)
output = engine_read_all
Expand Down

0 comments on commit 623203f

Please sign in to comment.