From e7b1864d46da8939935ed17530e2510e37a1f2ad Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Fri, 4 Mar 2011 01:35:17 +0000 Subject: [PATCH] THRIFT-867. php: PHP accelerator module's output transport is incompatible with TFramedTransport This patch prevents TFramedTransport from flushing empty frames. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1076918 13f79535-47bb-0310-9956-ffa450edef68 --- lib/php/src/transport/TFramedTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/php/src/transport/TFramedTransport.php b/lib/php/src/transport/TFramedTransport.php index dc57392f..b1c0bb5c 100644 --- a/lib/php/src/transport/TFramedTransport.php +++ b/lib/php/src/transport/TFramedTransport.php @@ -161,7 +161,7 @@ class TFramedTransport extends TTransport { * followed by the actual data. */ public function flush() { - if (!$this->write_) { + if (!$this->write_ || strlen($this->wBuf_) == 0) { return $this->transport_->flush(); } -- 2.17.1