diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-05-04 16:04:59 +0200 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-05-04 16:04:59 +0200 |
commit | b62500e2b25fd14c3ab25f479026cea0e6a712ab (patch) | |
tree | 5dda0ad84ee09c48b5ff130abfec04ef6e73ec77 | |
parent | 3cea24db036342df2985a1256909b9a17c4075ab (diff) | |
download | php-smpp-b62500e2b25fd14c3ab25f479026cea0e6a712ab.zip php-smpp-b62500e2b25fd14c3ab25f479026cea0e6a712ab.tar.gz php-smpp-b62500e2b25fd14c3ab25f479026cea0e6a712ab.tar.bz2 |
Updated thrift sockets to v. 0.6.1, and removed a namespace
-rw-r--r-- | transport/texception.class.php | 2 | ||||
-rw-r--r-- | transport/tsocket.class.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/transport/texception.class.php b/transport/texception.class.php index 59f7c87..10548fa 100644 --- a/transport/texception.class.php +++ b/transport/texception.class.php @@ -1,2 +1,2 @@ <?php -class TException extends \Exception { };
\ No newline at end of file +class TException extends Exception { };
\ No newline at end of file diff --git a/transport/tsocket.class.php b/transport/tsocket.class.php index e76e2cf..8a3b101 100644 --- a/transport/tsocket.class.php +++ b/transport/tsocket.class.php @@ -243,9 +243,9 @@ class TSocket extends TTransport { $pre = null; while (TRUE) { $buf = @fread($this->handle_, $len); - if ($buf === FALSE || $buf === '') { + if ($buf === FALSE) { $md = stream_get_meta_data($this->handle_); - if ($md['timed_out']) { + if (true === $md['timed_out'] && false === $md['blocked']) { throw new TTransportException('TSocket: timed out reading '.$len.' bytes from '. $this->host_.':'.$this->port_); } else { @@ -254,7 +254,7 @@ class TSocket extends TTransport { } } else if (($sz = strlen($buf)) < $len) { $md = stream_get_meta_data($this->handle_); - if ($md['timed_out']) { + if (true === $md['timed_out'] && false === $md['blocked']) { throw new TTransportException('TSocket: timed out reading '.$len.' bytes from '. $this->host_.':'.$this->port_); } else { @@ -279,9 +279,9 @@ class TSocket extends TTransport { $this->sendTimeoutSet_ = FALSE; } $data = @fread($this->handle_, $len); - if ($data === FALSE || $data === '') { + if ($data === FALSE) { $md = stream_get_meta_data($this->handle_); - if ($md['timed_out']) { + if (true === $md['timed_out'] && false === $md['blocked']) { throw new TTransportException('TSocket: timed out reading '.$len.' bytes from '. $this->host_.':'.$this->port_); } else { |