aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
Diffstat (limited to 'mpm')
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py
index 982e94c91..2f21edbee 100644
--- a/mpm/python/usrp_mpm/rpc_server.py
+++ b/mpm/python/usrp_mpm/rpc_server.py
@@ -159,6 +159,7 @@ class MPMServer(RPCServer):
self._state.lock.acquire()
if self._state.claim_status.value:
self.log.warning("Someone tried to claim this device again")
+ self._state.lock.release()
raise RuntimeError("Double-claim")
self.log.debug(
"Claiming from: %s, Session ID: %s",
@@ -204,8 +205,8 @@ class MPMServer(RPCServer):
if the device is claimed and the token doesn't match.
Or if the device is not claimed at all.
"""
- self._state.lock.acquire()
if self._state.claim_status.value:
+ self._state.lock.acquire()
if self._check_token_valid(token):
self._state.lock.release()
self.log.debug("reclaimed from: %s", self.client_host)