makela 2 tygodni temu
rodzic
commit
86ac54cafc
1 zmienionych plików z 9 dodań i 5 usunięć
  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})