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

Commit

Permalink
Simpler conditionals for connection testing
Browse files Browse the repository at this point in the history
- Per Ocramius' comments on
  zendframework/zendframework#804
  • Loading branch information
weierophinney committed Feb 23, 2012
1 parent aecd9f6 commit 5fc764a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client/Adapter/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ public function read()

// Close the connection if requested to do so by the server
$connection = $headers->get('connection');
if ($connection !== false && $connection->getFieldValue() == 'close') {
if ($connection && $connection->getFieldValue() == 'close') {
$this->close();
}
return $response;
Expand Down Expand Up @@ -463,7 +463,7 @@ public function read()

// Close the connection if requested to do so by the server
$connection = $headers->get('connection');
if ($connection !== false && $connection->getFieldValue() == 'close') {
if ($connection && $connection->getFieldValue() == 'close') {
$this->close();
}

Expand Down

0 comments on commit 5fc764a

Please # to comment.