Fix storing cloudflared token while start cloudflared

This commit is contained in:
Louis Lam 2022-03-31 15:58:39 +08:00
parent f02e9c44ec
commit 6674005e8b
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ module.exports.cloudflaredSocketHandler = (socket) => {
try {
checkLogin(socket);
if (token && typeof token === "string") {
await setSetting("cloudflaredTunnelToken", token);
cloudflared.token = token;
} else {
cloudflared.token = null;