In the service lock, reset the service, not the lock
It turns out that when you're in a context manager that has gotten the lock, attempting to set that lock to None will fail. It's also not the thing we actually want to do. What we WANT to do is reset the _service_ so that we'll ensure a new service object gets created. Change-Id: Ic39ef0418dcd5c0cbbe710ac1c31e58b744f56b5
This commit is contained in:
parent
cf43b98e33
commit
543954dd05
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixed an issue where a section of code that was supposed to be resetting
|
||||
the SwiftService object was instead resetting the protective mutex around
|
||||
the SwiftService object leading to an exception of "__exit__"
|
@ -2209,7 +2209,7 @@ class OpenStackCloud(object):
|
||||
with self._swift_client_lock:
|
||||
self._swift_client = None
|
||||
with self._swift_service_lock:
|
||||
self._swift_service_lock = None
|
||||
self._swift_service = None
|
||||
|
||||
self.create_object(
|
||||
container, name, filename,
|
||||
|
Loading…
Reference in New Issue
Block a user