diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-04-25 20:08:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-04-25 20:08:50 +0000 |
| commit | ca4aee67e3ef851c64150af39aa7dca3d2cab349 (patch) | |
| tree | ee8fa44f3c101e907ac06344c33d4fb6d183de01 | |
| parent | db136ae87d8f5e2fae0e2212c7d26a069db7e202 (diff) | |
| parent | 208c635a7d064fafc14dab97172c98cd5d8e6fc6 (diff) | |
| download | nova-ca4aee67e3ef851c64150af39aa7dca3d2cab349.tar.gz nova-ca4aee67e3ef851c64150af39aa7dca3d2cab349.tar.xz nova-ca4aee67e3ef851c64150af39aa7dca3d2cab349.zip | |
Merge "Don't leak RPC connections on timeouts or other exceptions"
| -rw-r--r-- | nova/rpc/amqp.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/rpc/amqp.py b/nova/rpc/amqp.py index cfa4ad1c1..ac29a625d 100644 --- a/nova/rpc/amqp.py +++ b/nova/rpc/amqp.py @@ -38,6 +38,7 @@ from nova import flags from nova import log as logging from nova.openstack.common import local import nova.rpc.common as rpc_common +from nova import utils LOG = logging.getLogger(__name__) @@ -293,7 +294,11 @@ class MulticallWaiter(object): if self._done: raise StopIteration while True: - self._iterator.next() + try: + self._iterator.next() + except Exception: + with utils.save_and_reraise_exception(): + self.done() if self._got_ending: self.done() raise StopIteration |
