diff --git a/lib/openssl/buffering.rb b/lib/openssl/buffering.rb index 1464a4292..771cfc95c 100644 --- a/lib/openssl/buffering.rb +++ b/lib/openssl/buffering.rb @@ -74,8 +74,6 @@ def initialize(*) def fill_rbuff begin @rbuffer.append_as_bytes(self.sysread(BLOCK_SIZE)) - rescue Errno::EAGAIN - retry rescue EOFError @eof = true end @@ -152,11 +150,7 @@ def readpartial(maxlen, buf=nil) end end if @rbuffer.empty? - begin - return sysread(maxlen, buf) - rescue Errno::EAGAIN - retry - end + return sysread(maxlen, buf) end ret = consume_rbuff(maxlen) if buf @@ -356,17 +350,13 @@ def do_write(s) nwrote = 0 begin while nwrote < buffer_size do - begin - chunk = if nwrote > 0 - @wbuffer.byteslice(nwrote, @wbuffer.bytesize) - else - @wbuffer - end - - nwrote += syswrite(chunk) - rescue Errno::EAGAIN - retry + chunk = if nwrote > 0 + @wbuffer.byteslice(nwrote, @wbuffer.bytesize) + else + @wbuffer end + + nwrote += syswrite(chunk) end ensure if nwrote < @wbuffer.bytesize