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

Commit

Permalink
Copy timeout if possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 23, 2024
1 parent 6c063c1 commit 965ff6d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/async/io/ssl_socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 and peer.respond_to?(:timeout=)
peer.timeout = timeout
end

wrapper = SSLSocket.new(peer, @context)

Expand Down

0 comments on commit 965ff6d

Please sign in to comment.