Skip to content

Commit

Permalink
Merge pull request #276 from Cald-fan/patch-10
Browse files Browse the repository at this point in the history
Update WebPanel.lua
  • Loading branch information
Sceleratis authored Feb 24, 2021
2 parents a182dfa + 8add907 commit b612a4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions WebPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
return function(Vargs)
local server = Vargs.Server;
local service = Vargs.Service;

local init = true
local HTTP = service.HttpService
local Encode = server.Functions.Base64Encode
Expand Down Expand Up @@ -224,15 +224,18 @@ return function(Vargs)

if init then
server.Logs:AddLog("Script", "WebPanel Initialization Complete")
server.Variables.WebPanel_Initiated = true
init = false
end
else
local code, msg = res.StatusCode, res.StatusMessage
if code ~= 520 or code ~= 524 then

if code ~= 520 and code ~= 524 then
server.Logs:AddLog("Script", "WebPanel Polling Error: "..msg.." ("..code..")")
server.Logs:AddLog("Errors", "WebPanel Polling Error: "..msg.." ("..code..")")
break
elseif code == 520 then
wait(5) --After the server restarts we want to make sure that it has time to inititate everything
end
end
wait()
Expand Down

0 comments on commit b612a4f

Please sign in to comment.