From 11165ce72725637f754805d94783e8d7d7714f33 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Mon, 29 Mar 2021 14:27:37 +0800 Subject: [PATCH] fix #1368 --- service/datacenterd.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/datacenterd.lua b/service/datacenterd.lua index 8a7b65a0..0c355186 100644 --- a/service/datacenterd.lua +++ b/service/datacenterd.lua @@ -15,7 +15,7 @@ end function command.QUERY(key, ...) local d = database[key] - if d then + if d ~= nil then return query(d, ...) end end @@ -59,7 +59,7 @@ end function command.UPDATE(...) local ret, value = update(database, ...) - if ret or value == nil then + if ret ~= nil or value == nil then return ret end local q = wakeup(wait_queue, ...) @@ -97,7 +97,7 @@ skynet.start(function() skynet.dispatch("lua", function (_, _, cmd, ...) if cmd == "WAIT" then local ret = command.QUERY(...) - if ret then + if ret ~= nil then skynet.ret(skynet.pack(ret)) else waitfor(wait_queue, ...)