tnc/php-amqplib — Issue #18: Hiphop causes AMQPConnection class' destructor to not get called, resulting in an exception
Author: arshadansari27
Created: 2011-11-14 10:30:43+00:00
State: open

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?