Skip to content

Commit

Permalink
Merge pull request #22 from boonedox/master
Browse files Browse the repository at this point in the history
bug fix for Stomp::readFrame, was occasionally reading more than one Frame, this merge prevents this as it only reads up to \n and checks for end of frame before anything of the next frame is read
  • Loading branch information
monofone committed Feb 23, 2013
2 parents 92265d5 + e143d5c commit 4ac51c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FuseSource/Stomp/Stomp.php
Expand Up @@ -563,7 +563,7 @@ public function readFrame ()
$end = false;

do {
$read = fread($this->_socket, $rb);
$read = fgets($this->_socket, $rb);
if ($read === false || $read === "") {
$this->_reconnect();
return $this->readFrame();
Expand Down

1 comment on commit 4ac51c0

@rupertchen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this fix be tagged and made available as a new version in packagist?

Please sign in to comment.