Open ish1301 opened 6 years ago
Please do this:
protected $timeout;
property to CurlClient
class$timeout = null
parameter to CurlClient
class constructor, that will be assigned to that $timeout
class property$this->timeout
is numeric, then set timeout on curl resourceThis would avoid BC break with enforced timeout of 30 seconds.
@ish1301 , I saw new commit, but it does only part of requested changes. I guess more commits are coming. Anyway, when you're ready to for code review just leave a message in here.
I can't do 2nd step, because that will force me to change ClientInterface and timeout can't be applied to other classes e.g. PHPClient.php
The only way to change timeout is $this->api->client->timeout = 30;
I can't do 2nd step, because that will force me to change ClientInterface
I haven't said, that you need to change ClientInterface
. I said, that you need to change CurlClient
class constructor (which isn't part of the ClientInterface
interface) so that you can specify curl-specific timeout. The timeout should be anything present in all client interface implementing parties.
The only way to change timeout is $this->api->client->timeout = 30;
That won't do of course.
Adding new parameter sendRequest()
function returns below error, because it expects sendRequest()
function to be exact structure as it's in ClientInterface
Declaration must be compatible with ClientInterface->sendRequest
Adding new parameter sendRequest() function returns below error, because it expects sendRequest() function to be exact structure as it's in ClientInterface
Declaration must be compatible with ClientInterface->sendRequest
Again I don't see where I requested to change that method signature.
Please don't do things that aren't requested.
Sometime JIRA server is down/moved and API takes forever to respond. So consistent timeout address this issue and fail with message that "JIRA server have timed out after 30000 mili seconds"