kopia lustrzana https://github.com/nextcloud/social
commit
0c8dce5c61
|
@ -107,6 +107,7 @@ class Queue extends TimedJob {
|
|||
|
||||
|
||||
private function manageStreamQueue() {
|
||||
$total = 0;
|
||||
$items = $this->streamQueueService->getRequestStandby($total);
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
|
|
@ -115,7 +115,14 @@ class CurlService {
|
|||
$request->addData('resource', 'acct:' . $account);
|
||||
$request->setAddress($host);
|
||||
|
||||
$result = $this->request($request);
|
||||
try {
|
||||
$result = $this->request($request);
|
||||
} catch (RequestNetworkException $e) {
|
||||
if ($e->getCode() === CURLE_COULDNT_CONNECT) {
|
||||
$request->setProtocol('http');
|
||||
$result = $this->request($request);
|
||||
} else throw $e;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@ -296,6 +303,7 @@ class CurlService {
|
|||
curl_setopt($curl, CURLOPT_BINARYTRANSFER, $request->isBinary());
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||
|
||||
$this->maxDownloadSize =
|
||||
|
@ -418,7 +426,7 @@ class CurlService {
|
|||
throw new RequestNetworkException(
|
||||
$errno . ' - ' . curl_error($curl) . ' - ' . json_encode(
|
||||
$request, JSON_UNESCAPED_SLASHES
|
||||
)
|
||||
), $errno
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue