Set proper timeouts for SSLSocket
commit0b0741103e7a11e37708eff6ba072de38ad3f4c7
authormwilliams <mwilliams@fb.com>
Fri, 5 Jul 2013 16:37:24 +0000 (5 09:37 -0700)
committerSara Golemon <sgolemon@fb.com>
Sat, 6 Jul 2013 18:12:28 +0000 (6 11:12 -0700)
tree2be30c74dd71fdebc0857794e1cbbb08b7d13a5a
parent8f6224d19422cd730638e5f5555d670cd63c7d44
Set proper timeouts for SSLSocket

If no timeout was specified in fsockopen, we passed in 0.0,
which was then used as the actual timeout, meaning that while the
socket opened, it almost always failed to open in ssl mode due to
timeout, and then read garbage data from the socket.

We also failed to pass in the specified timeout for non-ssl sockets,
but there we did use the default timeout rather than 0.0. I've changed
that to use the passed in timeout instead.
hphp/runtime/base/file/socket.cpp
hphp/runtime/base/file/socket.h
hphp/runtime/ext/ext_socket.cpp