local wsModuleOk, websocket = pcall(require, "websocket")
local client = websocket.client.copas({timeout = 5})
local connected, err = client:connect(WS_URL)
if not connected then
wsLog(
"WS CONNECT FAILED: " ..
tostring(err)
)
lastStatusText = "connect failed: " .. tostring(err)
pcall(function()
client:close()
end)
return false
end