php-amqplib
php-amqplib copied to clipboard
Hiphop causes AMQPConnection class' destructor to not get called, resulting in an exception
I'm using the library inside a code that runs on hiphop. Hiphop, in order to optimize, doesn't call the __destruct() method of an object when removing the objects at the end of the script. This results in AMQPConnection to get destroyed without its __destruct() method is called.
I wanted to know if is it possible to move the code that exists in the __destruct() method to the close method of AMQPConnection class? That would make the library compatible with hiphop. But it would render the connection object unreusable once the close would be performed, that would be bad if the client wants to pool the connection objects on close. Any suggestions?