Skip to content

Commit

Permalink
socket: Remove guard in blocking mode
Browse files Browse the repository at this point in the history
This has no effect, since @read_buffer is completely unused in
blocking mode. It just keeps the code cleaner.
  • Loading branch information
vasi-stripe committed Nov 8, 2022
1 parent e6aabd0 commit 464b7d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/excon/socket.rb
Expand Up @@ -221,9 +221,7 @@ def read_block(max_length)
raise(error)
end
rescue *READ_RETRY_EXCEPTION_CLASSES
if @read_buffer.empty?
select_with_timeout(@socket, :read) && retry
end
select_with_timeout(@socket, :read) && retry
rescue EOFError
@eof = true
end
Expand Down

0 comments on commit 464b7d5

Please sign in to comment.