php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76951 Stomp::hasFrame return true when ActiveMQ shutdown
Submitted: 2018-09-30 06:09 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jiangyuwise at gmail dot com Assigned:
Status: Open Package: stomp (PECL)
PHP Version: 7.2.10 OS: centos7
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-09-30 06:09 UTC] jiangyuwise at gmail dot com
Description:
------------
I'm trying to use stomp extension to read message from activeMQ.
But when the activeMQ has shut down, the Stomp::hasFrame function returns true.

Test script:
---------------
try {
    $stomp = new Stomp($hosts);
    $stomp->subscribe($queue);
    sleep(10); // shut down activeMQ quickly
    $hasFrame = $stomp->hasFrame($queue);
    var_dump($hasFrame);
    if ($hasFrame) {
        // read frame
    }
} catch (StompException $e) {
    echo $e->getCode(), ': ', $e->getMessage(), PHP_EOF;
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-28 01:04 UTC] takagi@php.net
Automatic comment from SVN on behalf of takagi
Revision: http://svn.php.net/viewvc/?view=revision&revision=345918
Log: Update translation

patch by anonymous #76951 and anonymous #76953
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Mar 24 10:01:25 2019 UTC