ruby/test/socket
Misaki Shioi ff5fc4b5a1
Do not save the last error without sockets in the connection attempt (#12153)
* Do not save the last_error if there are no sockets waiting to be connected

In this implementation, the results of both name resolution and connection attempts are awaited using select(2).
When it returned, the implementation attempted to check for connections even if there were no sockets currently attempting to connect, treating the absence of connected sockets as a connection failure.
With this fix, it will no longer check for connections when there are no sockets waiting to be connected.

Additionally, the following minor fixes have been made:

* Handle failure of getsockopt(2) and removed unnecessary continue in the loop

* Tweak: Use common API to check in_progress_fds

* Safely call TCPServer.new in test

* Set empty writefds when there is no socket waiting to be connected

* Enable fast_fallback option
2024-11-25 14:10:54 +09:00
..
test_addrinfo.rb Replace SocketError with Socket::ResolutionError in rsock_raise_socket_error 2023-11-30 13:27:19 +09:00
test_ancdata.rb
test_basicsocket.rb Use omit instead of skip: test/socket/**/*.rb 2021-12-28 20:29:54 +09:00
test_nonblock.rb Add support for sockaddr_un on Windows. (#6513) 2022-11-17 14:50:25 -08:00
test_socket.rb Revise 9ec342e07d 2024-02-26 13:12:05 +09:00
test_sockopt.rb Use omit instead of skip: test/socket/**/*.rb 2021-12-28 20:29:54 +09:00
test_tcp.rb Do not save the last error without sockets in the connection attempt (#12153) 2024-11-25 14:10:54 +09:00
test_udp.rb Use omit instead of skip: test/socket/**/*.rb 2021-12-28 20:29:54 +09:00
test_unix.rb Reduce the number of times IO is passed in send_io/recv_io test 2023-10-25 20:37:21 +09:00