Hello,
The HttpClientChannel in Java appears to set the ConnectTimeout but not the ReadTimeout on the HttpURLConnection. Could you add this in please.
I have customers complaining that their android devices are ‘hanging’ due to this error. Could you please tell me if it is possible to recompile the java library using the command line oxygene compiler or do I need the paid for version of Oxygene to do this?
Hello,
Sorry to bump an old topic but this is not fixed in RO 9.7.115.1441. The Http client channel has no read timeout set, so on android mobile devices on 4G networks we get devices waiting forever for data which will never come.
I’ve added a pic of my changes for HTTPClientChannel. The TCPClient* units don’t appear to set any timeouts at all (connect or read). Could that be fixed as well please?
Hello,
I’m afraid this is still not fixed in 10.0.0.1457. I can see that the readTimeout property has been added to HTTPClientChannel but it is never hooked up to anything so has no effect. The code needs the readtimeout added as per the below
method HttpClientChannel.initHttpRequest(contentType: String; contentLength: Integer): HttpURLConnection;
begin
var request: HttpURLConnection := HttpURLConnection(self.TargetUrl.toURL().openConnection());
request.DoInput := true;
request.DoOutput := true;
request.RequestMethod := "POST";
request.FollowRedirects := self.FollowRedirects;
request.ConnectTimeout := self.ConnectTimeout;
request.ReadTimeout := self.ReadTimeout; <---------ADD THIS LINE.
if (self.Authorization <> nil) and (self.Authorization.length() > 0) then begin
request.setRequestProperty("Authorization", self.Authorization);
end;
request.setRequestProperty("Content-Type", contentType);
request.setRequestProperty("Content-Length", contentLength.toString());
self.setupHttpRequest(request);
exit request;
end;