Skip to content

Commit b6a0cc7

Browse files
authored
Update BigBlueButton.php
Customize XML Response Timeout, in my case I like to adjust it to 2ms instead of your default 10ms
1 parent bae7b32 commit b6a0cc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BigBlueButton.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class BigBlueButton
6060
protected $bbbServerBaseUrl;
6161
protected $urlBuilder;
6262
protected $jSessionId;
63+
public $timeOut = 10;
6364

6465
/**
6566
* BigBlueButton constructor.
@@ -458,7 +459,6 @@ private function processXmlResponse($url, $payload = '', $contentType = 'applica
458459
if (!$ch) {
459460
throw new \RuntimeException('Unhandled curl error: ' . curl_error($ch));
460461
}
461-
$timeout = 10;
462462

463463
// Needed to store the JSESSIONID
464464
$cookiefile = tmpfile();
@@ -469,7 +469,7 @@ private function processXmlResponse($url, $payload = '', $contentType = 'applica
469469
curl_setopt($ch, CURLOPT_URL, $url);
470470
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
471471
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
472-
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
472+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeOut);
473473
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefilepath);
474474
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefilepath);
475475
if (!empty($payload)) {

0 commit comments

Comments
 (0)