From a48781a52d9f79c290c153830cf1ee48348b9a67 Mon Sep 17 00:00:00 2001 From: "James E. King, III" Date: Sat, 1 Apr 2017 15:57:36 -0400 Subject: [PATCH] THRIFT-4154: properly close socket whether it is persistent or not on close() --- lib/php/lib/Thrift/Transport/TSocket.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/php/lib/Thrift/Transport/TSocket.php b/lib/php/lib/Thrift/Transport/TSocket.php index 10d5115d925..1495047e168 100644 --- a/lib/php/lib/Thrift/Transport/TSocket.php +++ b/lib/php/lib/Thrift/Transport/TSocket.php @@ -248,10 +248,8 @@ public function open() */ public function close() { - if (!$this->persist_) { - @fclose($this->handle_); - $this->handle_ = null; - } + @fclose($this->handle_); + $this->handle_ = null; } /**