Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit 8bd1eed

Browse files
committed
🎨 优化变量名称
1 parent 6de39e6 commit 8bd1eed

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

main.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
run(function()use ($config){
2323
//注册信号处理器
2424
function registerSigintHandler() {
25-
global $tokentimeid;
25+
global $tokentimerid;
2626
$shouldExit = false; // 初始化为false
27-
Swoole\Process::signal(SIGINT, function ($signo) use ($tokentimeid) {
27+
Swoole\Process::signal(SIGINT, function ($signo) use ($tokentimerid) {
2828
try {
2929
global $shouldExit;
3030
$shouldExit = true; // 设置退出标志
31-
Swoole\Timer::clear($tokentimeid);
31+
Swoole\Timer::clear($tokentimerid);
3232
echo PHP_EOL;
3333
mlog("正在退出...");
3434
exit();
@@ -45,13 +45,13 @@ function registerSigintHandler() {
4545
mlog("GetToken:".$tokendata['token'],1);
4646
mlog("TokenTTL:".$tokendata['upttl'],1);
4747
//启动更新TokenTimer
48-
global $tokentimeid;
49-
$tokentimeid = Swoole\Timer::tick($tokendata['upttl'], function () use ($token) {
48+
global $tokentimerid;
49+
$tokentimerid = Swoole\Timer::tick($tokendata['upttl'], function () use ($token) {
5050
$tokendata = $token->gettoken();
5151
mlog("GetNewToken:".$tokendata['token'],1);
5252
});
5353
registerSigintHandler();
54-
mlog("Timer start on ID{$tokentimeid}",1);
54+
mlog("Timer start on ID{$tokentimerid}",1);
5555

5656
//下载文件列表
5757
$cluster = new cluster($tokendata['token'],VERSION);

0 commit comments

Comments
 (0)