This repository was archived by the owner on Mar 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public function connect() {
47
47
}
48
48
if ($ code [0 ] == '41 ' ){
49
49
mlog ("[socket.io]Close Connection " );
50
+ global $ pid ;
51
+ posix_kill ($ pid , SIGINT );
50
52
$ client ->close ();
51
53
return ;
52
54
}
Original file line number Diff line number Diff line change 8
8
const VERSION = '1.10.3 ' ;
9
9
global $ DOWNLOAD_DIR ;
10
10
$ DOWNLOAD_DIR = $ config ['cache_dir ' ];
11
- const USERAGENT = 'openbmclapi-cluster/ ' . VERSION . ' ' . 'PHP-OpenBmclApi/ ' .PHPOBAVERSION ;
11
+ const USERAGENT = 'openbmclapi-cluster/ ' . VERSION . ' ' . 'PHP-OpenBmclApi/ ' .PHPOBAVERSION ;
12
12
const OPENBMCLAPIURL = 'openbmclapi.bangbang93.com ' ;
13
13
global $ tokendata ;
14
14
$ list = glob ('./inc/*.php ' );
15
15
foreach ($ list as $ file ) {
16
16
$ file = explode ('/ ' , $ file )['2 ' ];
17
17
require './inc/ ' . $ file ;
18
18
}
19
+ global $ pid ;
20
+ $ pid = getmypid ();
19
21
echo "OpenBmclApionPHP v0.0.1-dev " . PHP_EOL ;
20
22
run (function ()use ($ config ){
21
23
//注册信号处理器
@@ -28,7 +30,7 @@ function registerSigintHandler() {
28
30
$ shouldExit = true ; // 设置退出标志
29
31
Swoole \Timer::clear ($ timerId );
30
32
echo PHP_EOL ;
31
- mlog ("主动退出 ... " );
33
+ mlog ("正在退出 ... " );
32
34
exit ();
33
35
} catch (\Swoole \ExitException $ e ) {
34
36
//var_dump($e->getMessage());
@@ -48,6 +50,7 @@ function registerSigintHandler() {
48
50
$ tokendata = $ token ->gettoken ();
49
51
mlog ("GetNewToken: " .$ tokendata ['token ' ],1 );
50
52
});
53
+ global $ socketio ;
51
54
registerSigintHandler ();
52
55
mlog ("Timer start on ID {$ timerId }" ,1 );
53
56
You can’t perform that action at this time.
0 commit comments