makela 2 viikkoa sitten
vanhempi
commit
86ac54cafc
1 muutettua tiedostoa jossa 9 lisäystä ja 5 poistoa
  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})