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

Commit 05d9c7f

Browse files
committed
Copy timeout if possible.
1 parent 6c063c1 commit 05d9c7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/async/io/ssl_socket.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ def listen(*args)
118118
@server.listen(*args)
119119
end
120120

121-
def accept(task: Task.current, **options)
122-
peer, address = @server.accept(**options)
121+
def accept(task: Task.current, timeout: nil)
122+
peer, address = @server.accept
123+
124+
if timeout
125+
peer.timeout = timeout
126+
end
123127

124128
wrapper = SSLSocket.new(peer, @context)
125129

0 commit comments

Comments
 (0)