Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #11 from tyranron/handle-empty-reads-correctly
Browse files Browse the repository at this point in the history
Do not finish socket reads until EOF is received
  • Loading branch information
BirknerAlex authored Oct 4, 2018
2 parents ab642da + 269ab19 commit f2ad157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BirknerAlex/XMPPHP/XMLStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ private function __process($maximum = 5, $return_when_received = false)
$part = fread($this->socket, 4096);
stream_set_blocking($this->socket, 1);

if (!$part) {
if (!$part && feof($this->socket)) {
if($this->reconnect) {
$this->doReconnect();
} else {
Expand Down

0 comments on commit f2ad157

Please sign in to comment.