From e0feea99953ae0f30fedac5912d1761af479a65d Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 19 Aug 2014 23:44:07 +0800 Subject: [PATCH] fix issue #156 --- service/datacenterd.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/datacenterd.lua b/service/datacenterd.lua index 5929b0e3..abc1eea6 100644 --- a/service/datacenterd.lua +++ b/service/datacenterd.lua @@ -33,7 +33,7 @@ local function update(db, key, value, ...) end end -local function wakeup(db, key1, key2, value, ...) +local function wakeup(db, key1, key2, ...) if key1 == nil then return end @@ -43,7 +43,7 @@ local function wakeup(db, key1, key2, value, ...) end if q[mode] == "queue" then db[key1] = nil - if value then + if key2 then -- throw error because can't wake up a branch for _,response in ipairs(q) do response(false) @@ -53,7 +53,7 @@ local function wakeup(db, key1, key2, value, ...) end else -- it's branch - return wakeup(q , key2, value, ...) + return wakeup(q , key2, ...) end end