From b0e7c9346b02f033f0733574f302de1cd2b1f7ba Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Wed, 2 Sep 2015 15:23:47 -0400 Subject: [PATCH] always release queue lock --- poller-service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poller-service.py b/poller-service.py index 9c17e0fe5..6d4296207 100755 --- a/poller-service.py +++ b/poller-service.py @@ -215,11 +215,11 @@ def getThreadActionLock(device_id, action): for thread_cursor in thread_cursors: if thread_cursor.in_use == 'queue.{0}'.format(device_id): thread_cursor.in_use = '{0}.{1}'.format(action, device_id) + releaseLock('queue.{0}'.format(device_id), thread_cursor.cursor) if getLock('{0}.{1}'.format(action, device_id), thread_cursor.cursor): return True else: thread_cursor.in_use = False - releaseLock('queue.{0}'.format(device_id), thread_cursor.cursor) return False return False