diff options
author | John Eckersberg <jeckersb@redhat.com> | 2016-03-09 14:38:02 -0500 |
---|---|---|
committer | John Eckersberg <jeckersb@redhat.com> | 2016-03-09 14:38:02 -0500 |
commit | 2a97276c6e1386fb3368fdcb33ae24b283b5425e (patch) | |
tree | 63031f6c4226945422320cd3196a8005e2d0b954 | |
parent | 2293a17c76500e05a3ca02bd1120690f5455e19a (diff) | |
download | oslo-messaging-kilo-eol.tar.gz |
Don't resend first reply after AMQPDestinationNotFound errorkilo-eolstable/kilo
Change I492b82082a372763e60cf06ce0b8135ade7a6e71 was the Kilo backport
of I0d3c16ea6d2c1da143de4924b3be41d1cea159bd, but during the backport
the logic guarding against resending the first reply was lost. This
re-adds that logic for Kilo to guard against that case.
Change-Id: I2217d059f5ea3a0fe1dadd564c6ac1cc51ddac17
-rw-r--r-- | oslo_messaging/_drivers/amqpdriver.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/oslo_messaging/_drivers/amqpdriver.py b/oslo_messaging/_drivers/amqpdriver.py index 5378844..34400c6 100644 --- a/oslo_messaging/_drivers/amqpdriver.py +++ b/oslo_messaging/_drivers/amqpdriver.py @@ -78,12 +78,15 @@ class AMQPIncomingMessage(base.IncomingMessage): timer = rpc_common.DecayingTimer(duration=duration) timer.start() + first_reply_sent = False while True: try: with self.listener.driver._get_connection( rpc_amqp.PURPOSE_SEND) as conn: - self._send_reply(conn, reply, failure, - log_failure=log_failure) + if not first_reply_sent: + self._send_reply(conn, reply, failure, + log_failure=log_failure) + first_reply_sent = True self._send_reply(conn, ending=True) return except rpc_amqp.AMQPDestinationNotFound: |