Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix Socket.tcp connect_timeout option #4061
Added adopted spec from MRI, because it's excluded by other reasons.
Before commit `Socket.tcp(host, port, connect_timeout: 0.1)` ignored timeout option. This happened because `connect_internal` mistakenly responded with `:wait_readable` instead of `:wait_writable`. After fixing it this code started to constantly fail with timeout error. Checking for OP_CONNECT in IO#wait_writable fixed this issue.