'Revive the producer after connection loss.'

def revive(self, channel):

    if is_connection(channel):
        connection = channel
        self.__connection__ = connection
        channel = ChannelPromise((lambda : connection.default_channel))
    if isinstance(channel, ChannelPromise):
        self._channel = channel
        self.exchange = self.exchange(channel)
    else:
        self._channel = channel
        if self.on_return:
            self._channel.events[u'basic_return'].add(self.on_return)
        self.exchange = self.exchange(channel)
