Actions
Bug #10788
closedTimeout not work with socket
Description
Timeout.timeout(1) do TCPSocket.new "33.2.2.1",333 end
The ip 33.2.2.1 is unreachable, I except it raise Timeout::Error, but
in fact it always raise Errno::ETIMEDOUT!
But I test it on Ubuntu14.04(ruby2.0), it's ok!
Updated by usa (Usaku NAKAMURA) about 9 years ago
Unfortunately, it's a restriction of WinSock.
You have to use Socket instead of TCPSocket and call Socket#connect_nonblock for your purpose.
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0