TCloudBase

in TCloudBase please add timeout feature in connection property

i've added this code after all internetconnect call

hConnect := InternetConnect(hInet, PChar(ServerName), INTERNET_DEFAULT_HTTPS_PORT, PChar(UserName), Pchar(Password), INTERNET_SERVICE_HTTP, 0, 0);
if hConnect=nil then
begin
  ErrorCode := GetLastError;
  raise Exception.Create(Format('InternetConnect Error %d Description %s',[ErrorCode,HttpError(ErrorCode)]));
end;

// BIOSFERA
InternalSetTimeOut(hConnect);

.....

procedure InternalSetTimeOut(hConnect: HINTERNET);
var
FconnectTimeoutMS: integer;
FsendTimeoutMS: integer;
FreceiveTimeoutMS: integer;

procedure configureHttpRequest;
begin
InternetSetOption(hConnect, INTERNET_OPTION_CONNECT_TIMEOUT, Pointer(@FconnectTimeoutMS),
SizeOf(FconnectTimeoutMS));
InternetSetOption(hConnect, INTERNET_OPTION_SEND_TIMEOUT, Pointer(@FsendTimeoutMS),
SizeOf(FsendTimeoutMS));
InternetSetOption(hConnect, INTERNET_OPTION_RECEIVE_TIMEOUT, Pointer(@FreceiveTimeoutMS),
SizeOf(FreceiveTimeoutMS));
end;

begin
FconnectTimeoutMS := 1000 * nSecondi;
FsendTimeoutMS := 1000 * nSecondi;
FreceiveTimeoutMS := 1000 * nSecondi;
configureHttpRequest;
// httpopenrequest necessita di un time out + alto
end;

bye carlo