Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Conversation

mlocati
Copy link
Contributor

@mlocati mlocati commented Dec 2, 2016

See #96

Copy link
Contributor

@ezimuel ezimuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlocati I did a first review of your PR. As commented in details, I think we can use the old parameter timeout instead of executetimeout.
The PR needs to be completed with unit test to cover the new features, can you add it?
Moreover, the PR should be send to develop because this is a new feature.
Thanks!

}
}

if (isset($this->config['executetimeout'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of add a new parameter executetimeout why we don't use the old one timeout? The meaning is the same and we can be aligned with the curl constant naming.

} elseif (isset($this->config['timeout'])) {
$connectTimeout = $this->config['timeout'];
} else {
$connectTimeout = @ini_get('default_socket_timeout');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally don't use the @ operator. Anyway, in this case the value default_socket_timeout is available since PHP 4.3.0.

$timedout = $info['timed_out'];
if ($timedout) {
$this->close();
if (isset($this->config['executetimeout'])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As commented for the curl adapter, even in this case we should continue to use the timeout parameter instead of adding a new one (executetimeout).

} elseif (isset($this->config['timeout'])) {
$executeTimeout = $this->config['timeout'];
} else {
$executeTimeout = @ini_get('default_socket_timeout');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment of curl adapter. Don't use the @ operator.

src/Client.php Outdated
'useragent' => 'Zend\Http\Client',
'timeout' => 10,
'connecttimeout' => null,
'executetimeout' => null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the old value timeout instead of adding executetimeout.

@ezimuel ezimuel self-assigned this Jan 17, 2017
@ezimuel ezimuel added this to the 2.6.0 milestone Jan 17, 2017
@mlocati mlocati force-pushed the split-timeout-in-connect-and-execute branch from c4be26a to 6da4e3d Compare January 17, 2017 13:11
@mlocati mlocati changed the base branch from master to develop January 17, 2017 13:12
@mlocati
Copy link
Contributor Author

mlocati commented Jan 17, 2017

@mlocati I did a first review of your PR. As commented in details, I think we can use the old parameter timeout instead of executetimeout.

Done in 6da4e3d

The PR needs to be completed with unit test to cover the new features, can you add it?

I'm going to do this.

Moreover, the PR should be send to develop because this is a new feature.
Thanks!

PR updated: now it's against develop

@mlocati
Copy link
Contributor Author

mlocati commented Jan 17, 2017

The PR needs to be completed with unit test to cover the new features, can you add it?

Done in 0bff41b

@ezimuel ezimuel merged commit 9082945 into zendframework:develop Jan 24, 2017
@ezimuel
Copy link
Contributor

ezimuel commented Jan 24, 2017

@mlocati thanks for your contribution!

@mlocati mlocati deleted the split-timeout-in-connect-and-execute branch January 24, 2017 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants