THRIFT-4154: properly close socket whether it is persistent or not on close()
Client: php
This closes #1011
This closes #1233
diff --git a/lib/php/lib/Thrift/Transport/TSocket.php b/lib/php/lib/Thrift/Transport/TSocket.php
index 10d5115..1495047 100644
--- a/lib/php/lib/Thrift/Transport/TSocket.php
+++ b/lib/php/lib/Thrift/Transport/TSocket.php
@@ -248,10 +248,8 @@
*/
public function close()
{
- if (!$this->persist_) {
- @fclose($this->handle_);
- $this->handle_ = null;
- }
+ @fclose($this->handle_);
+ $this->handle_ = null;
}
/**