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

Commit 446a1c7

Browse files
committed
IO#timeout compatibility fix. Ruby < 3.2 doesn't provide IO#timeout.
1 parent 91ef29e commit 446a1c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/async/io/ssl_socket.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ def initialize(socket, context)
6363
# This ensures that when the internal IO is closed, it also closes the internal socket:
6464
io.sync_close = true
6565

66-
@timeout = socket.timeout
66+
if socket.respond_to?(:timeout)
67+
@timeout = socket.timeout
68+
end
6769
end
6870
end
6971

0 commit comments

Comments
 (0)