瀏覽代碼

web接口

makela 2 周之前
父節點
當前提交
86ac54cafc
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      project/webpage/check_server.lua

+ 9 - 5
project/webpage/check_server.lua

@@ -34,11 +34,15 @@ local function check_server(args, ipaddr, header)
     local sid = args.sid
     local account = args.account
     local channel = args.channel or ""
-    local create = skynet.call(usercenter, "lua", "exsits", {
-        sid = sid,
-        account = account,
-        channel = channel,
-    })
+    local create = false
+    if sid and account and channel then
+        skynet.call(usercenter, "lua", "exsits", {
+            sid = sid,
+            account = account,
+            channel = channel,
+        })
+    end
+
 
     local maintain = skynet.call(ws_watchdog, "lua", "getstatus")
     local ret = cjson.encode({state = 0, create = create, open = maintain and false or true})