From c6ded922c586cad7f66b57a123fec520e5c36a5e Mon Sep 17 00:00:00 2001 From: "James E. King, III" Date: Sat, 1 Apr 2017 23:26:54 -0400 Subject: THRIFT-4154: properly close socket whether it is persistent or not on close() Client: php This closes #1011 This closes #1233 --- lib/php/lib/Thrift/Transport/TSocket.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/php') diff --git a/lib/php/lib/Thrift/Transport/TSocket.php b/lib/php/lib/Thrift/Transport/TSocket.php index 10d5115d9..1495047e1 100644 --- a/lib/php/lib/Thrift/Transport/TSocket.php +++ b/lib/php/lib/Thrift/Transport/TSocket.php @@ -248,10 +248,8 @@ class TSocket extends TTransport */ public function close() { - if (!$this->persist_) { - @fclose($this->handle_); - $this->handle_ = null; - } + @fclose($this->handle_); + $this->handle_ = null; } /** -- cgit v1.2.1