Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Interfaces/AAA/PrivHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ QByteArray PrivHelpers::getURL(const QString& _url) {

QtCUrl::Options Opt;
Opt[CURLOPT_URL] = _url;
Opt[CURLOPT_TIMEOUT] = 30;
Opt[CURLOPT_TIMEOUT] = 5;
Opt[CURLOPT_CONNECTTIMEOUT] = 5;
Opt[CURLOPT_FAILONERROR] = true;
QString CUrlResult = CUrl.exec(Opt);

Expand Down
3 changes: 2 additions & 1 deletion Interfaces/Helpers/RESTClientHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ QVariant RESTClientHelper::callAPI(
QtCUrl::Options Opt;
Opt[CURLOPT_URL] = makeURL();
Opt[CURLOPT_FAILONERROR] = false;
Opt[CURLOPT_TIMEOUT] = 10000;
Opt[CURLOPT_TIMEOUT] = 5;
Opt[CURLOPT_CONNECTTIMEOUT] = 5;

Opt[CURLOPT_SSL_VERIFYPEER] = 0;
Opt[CURLOPT_SSL_VERIFYHOST] = 0;
Expand Down
3 changes: 2 additions & 1 deletion ModuleHelpers/MT/Gateways/gtwLuaOpenNMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ QVariantMap gtwLuaOpenNMT::doTranslation(
curl_setopt($ch, CURLOPT_URL, $CurrServer);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([array("src"=>$sourceText)]));

Expand Down
3 changes: 2 additions & 1 deletion ModuleHelpers/MT/Gateways/gtwTargomanSMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ QVariantMap gtwTargomanSMT::doTranslation(
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $CurrServers[$LastServer]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);

Expand Down
3 changes: 2 additions & 1 deletion ModuleHelpers/MT/Gateways/intfBaseNMTGateway.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ QVariantMap intfBaseNMTGateway::doTranslation(
Opt[CURLOPT_URL] = _engineSpecs.URLs.at(0);

Opt[CURLOPT_POST] = true;
Opt[CURLOPT_TIMEOUT] = 1000;
Opt[CURLOPT_TIMEOUT] = 5;
Opt[CURLOPT_CONNECTTIMEOUT] = 5;
Opt[CURLOPT_FAILONERROR] = true;
Opt[CURLOPT_HTTPHEADER] = QStringList({
{ "Content-Type: application/json" },
Expand Down
3 changes: 2 additions & 1 deletion Modules/Account/moduleSrc/Payment/intfPaymentGateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ class intfPaymentGateway
Opt[CURLOPT_POST] = true;
Opt[CURLOPT_FOLLOWLOCATION] = true;
Opt[CURLOPT_FAILONERROR] = true;
Opt[CURLOPT_TIMEOUT] = 60;
Opt[CURLOPT_TIMEOUT] = 5;
Opt[CURLOPT_CONNECTTIMEOUT] = 5;

Opt[CURLOPT_SSL_VERIFYPEER] = 0;
Opt[CURLOPT_SSL_VERIFYHOST] = 0;
Expand Down