Commit 35056743 authored by Klaus Aehlig's avatar Klaus Aehlig

Only unlock config if we did lock it

We only acquired a config lock if it was not shared in order
to have lock-free reads. Hence, only release the config lock
if we actually acquired it.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarNiklas Hambuechen <niklash@google.com>
parent 90d03366
......@@ -2929,7 +2929,7 @@ class ConfigWriter(object):
except Exception, err:
logging.critical("Can't write the configuration: %s", str(err))
raise
elif not self._offline:
elif not self._offline and not self._lock_current_shared:
logging.debug("Unlocking configuration without writing")
self._wconfd.UnlockConfig(self._GetWConfdContext())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment