diff --git a/.gitignore b/.gitignore index 46422e3..0fcb3c9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ nbproject composer.lock composer.phar vendor +/.idea diff --git a/src/FuseSource/Stomp/Stomp.php b/src/FuseSource/Stomp/Stomp.php index 29491e7..2759981 100755 --- a/src/FuseSource/Stomp/Stomp.php +++ b/src/FuseSource/Stomp/Stomp.php @@ -341,7 +341,7 @@ public function subscribe ($destination, $properties = null, $sync = null) } else if ($this->brokerVendor == 'RMQ') { $headers['prefetch-count'] = $this->prefetchSize; } - + if ($this->clientId != null) { if ($this->brokerVendor == 'AMQ') { $headers['activemq.subscriptionName'] = $this->clientId; @@ -558,12 +558,11 @@ public function readFrame () return false; } - $rb = 1024; $data = ''; $end = false; do { - $read = fgets($this->_socket, $rb); + $read = fgetc($this->_socket); if ($read === false || $read === "") { $this->_reconnect(); return $this->readFrame();