Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
IO#timeout compatibility fix. Ruby < 3.2 doesn't provide IO#timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 23, 2024
1 parent 91ef29e commit 446a1c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/async/io/ssl_socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def initialize(socket, context)
# This ensures that when the internal IO is closed, it also closes the internal socket:
io.sync_close = true

@timeout = socket.timeout
if socket.respond_to?(:timeout)
@timeout = socket.timeout
end
end
end

Expand Down

0 comments on commit 446a1c7

Please sign in to comment.