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 import log as logging
|
||||||
from nova.openstack.common import local
|
from nova.openstack.common import local
|
||||||
import nova.rpc.common as rpc_common
|
import nova.rpc.common as rpc_common
|
||||||
|
from nova import utils
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -293,7 +294,11 @@ class MulticallWaiter(object):
|
|||||||
if self._done:
|
if self._done:
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
self._iterator.next()
|
self._iterator.next()
|
||||||
|
except Exception:
|
||||||
|
with utils.save_and_reraise_exception():
|
||||||
|
self.done()
|
||||||
if self._got_ending:
|
if self._got_ending:
|
||||||
self.done()
|
self.done()
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
|
|||||||
Reference in New Issue
Block a user