Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6979bdb
)
Check for empty buf on socket read
author
Mark Slee
<mcslee@apache.org>
Thu, 28 Sep 2006 03:19:03 +0000
(
03:19
+0000)
committer
Mark Slee
<mcslee@apache.org>
Thu, 28 Sep 2006 03:19:03 +0000
(
03:19
+0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664809
13f79535
-47bb-0310-9956-
ffa450edef68
lib/php/src/transport/TSocket.php
patch
|
blob
|
history
diff --git
a/lib/php/src/transport/TSocket.php
b/lib/php/src/transport/TSocket.php
index
5ecd874
..
5ca23e7
100644
(file)
--- a/
lib/php/src/transport/TSocket.php
+++ b/
lib/php/src/transport/TSocket.php
@@
-169,9
+169,9
@@
class TSocket extends TTransport {
// $buf = @stream_get_contents($this->handle_, $len);
$pre = null;
- while (
true
) {
+ while (
TRUE
) {
$buf = @fread($this->handle_, $len);
- if (
$buf === FALSE
) {
+ if (
!$buf
) {
throw new Exception('TSocket: Could not read '.$len.' bytes from '.
$this->host_.':'.$this->port_);
} else if (($sz = strlen($buf)) < $len) {