swarrot / SwarrotBundle

A symfony bundle for swarrot integration
MIT License
89 stars 59 forks source link

fix(pecl): Check if the connection is connected when creating a channel #212

Open u2032 opened 3 years ago

u2032 commented 3 years ago

If the connection is not connected, the constructor of the AMQPChannel throws an exception stating : Could not create channel. No connection available.

In particular, if the first connect() method call failed, the ampqconnection is stored in the class even if the connection is not opened and all future calls to the getChannel() method didn't try to reconnect, failing with the above exception