Skip to content

Commit

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

data = @socket.read_nonblock(size)

return nil unless data
data = @socket.read_nonblock(size, exception: false)
if data == :wait_readable || data == :wait_writable
raise Errno::EAGAIN
elsif data.nil?
return nil
end

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

0 comments on commit 6e7fba4

Please sign in to comment.