Don't leak RPC connections on timeouts or other exceptions
Fixes bug 968843 Change-Id: I9e0f1e306cab203bf4c865050b7a45f96127062e
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user