I am connecting with a relatively dodgy SOAP service using XML::Compile::WSDL11, and have adjusted the timeout to keep them on a short leash. This worked in the past when the SSL connections were successfully established and they just took a long time to return a response.
However, yesterday their server was so slow we weren't even able to establish a connection. Turns out the timeout that I set doesn't get used in this case. Net::HTTPS doesn't allow the socket to be set to non-blocking mode (sub blocking is a noop), and IO::Socket::connect ends up trying to connect in blocking mode. I have already emailed perl5-porters to solicit their input, but I throw myself at the enlightened feet of the monastery as well.
What can I do to get a timeout to apply to the connect phase? Can Net::HTTPS be adjusted so as to support a non-blocking socket? Can IO::Socket::connect use an alarm when invoked in blocking mode? (I know I can do these things, but I'm more asking if there are unexpected gotchas that may arise as a result.)
In reply to Timeouts for HTTPS socket connection by tigre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |