ZF-7623: Zend_Queue_Stomp_Client_Connection

Description

I have an old version of zend core/php that returns allways zero on a call to stream_select, so I think (not sure) if it is better to check if the return array is empty, it works on my zend core version (PHP 5.2.5, Zend Core v2.5.0 running on a debian 5.0.2) ? In the function canRead of Zend_Queue_Stomp_Client_Connection change the code from :


        return stream_select(
            $read,
            $write,
            $except,
            $this->_options['timeout_sec'],
            $this->_options['timeout_usec']
        ) == 1;
        // see http://us.php.net/manual/en/…
    }

to:


        $ret =  stream_select(
            $read,
            $write,
            $except,
            $this->_options['timeout_sec'],
            $this->_options['timeout_usec']
        );
        return ! ( $ret === false || empty( $read ) );
        // see http://us.php.net/manual/en/…
    }

Comments

I'm thinking about this.

-daniel

better you can do something like: if ($ret==false) throw Exception(...) return !empty( $read )

sorry I forget an equal sign in $ret==false must be $ret===false

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.