diff --git a/lib/async/io/ssl_socket.rb b/lib/async/io/ssl_socket.rb index 8b26dd1..d934b0d 100644 --- a/lib/async/io/ssl_socket.rb +++ b/lib/async/io/ssl_socket.rb @@ -118,8 +118,12 @@ def listen(*args) @server.listen(*args) end - def accept(task: Task.current, **options) - peer, address = @server.accept(**options) + def accept(task: Task.current, timeout: nil) + peer, address = @server.accept + + if timeout + peer.timeout = timeout + end wrapper = SSLSocket.new(peer, @context)