Comment 2 for bug 969229

Revision history for this message
Vsevolod Novikov (nnseva) wrote :

It is possible and useful to remove the channel from the client dict immediately when the channel is closed, using appropriate event. The applied patch does it such a way, that the code like the following works correctly:

    try:
        yield self.chan.queue_delete(queue="chatrooms") # here the 404 happens
    except Exception,ex:
        print "Error deleting queue %s, ignored" % ex
        self.chan = yield self.conn.channel(1) # here the channel is recreated just because it is already removed from the dict
        yield self.chan.channel_open()