Skip to content

Commit

Permalink
Fix TCPSocket connection problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
636f7374 committed Mar 20, 2022
1 parent 98c0379 commit 73ee4dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dns/extra/socket/tcp_socket.cr
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class TCPSocket < IPSocket

ip_addresses.each_with_index do |ip_address, index|
break if connect_timeout_time_span <= (Time.local - starting_time)
ip_address = Socket::IPAddress.new address: ip_address.address, port: port if ip_address.port.zero?

case ip_address.family
when .inet?
Expand Down

0 comments on commit 73ee4dd

Please sign in to comment.