On May 14, 2006, at 9:08 AM, Sven de Marothy wrote:
On Sun, 2006-05-14 at 00:17 -0700, Casey Marshall wrote:On May 12, 2006, at 2:06 PM, Sven de Marothy wrote:This adds the 1.5 timeout methods in URLConnection and implements themfor HttUrlConnection (and HttpsUrlConnection). It also fixes a long-standing bug in the native-target-layer aicas thingie. SO_TIMEOUT timeout was being used as a socket option, when it's the name of the Java socket option. The POSIX constants are SO_SNDTIMEO and SO_RCVTIMEO. So timeouts actually work now. (I could say something nasty here about preprocessor macros.. )This introduces a warning, and thus doesn't compile with -Werror, and generally doesn't look right (should the operator be `||' and not `|'? Otherwise, you aren't short-circuiting the second call to `setsockopt' if the first fails). Removing the warning just means putting parentheses around the `|' operation.No, '|' is what was intended. My intent is that it should fail if eithercall returns a nonzero (error) result.
Yeah, I figured out what you were doing when going to sleep last night ;-)
But still, wouldn't an && be better for that?
PGP.sig
Description: This is a digitally signed message part