mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
修复热加载不同配置文件的bug
This commit is contained in:
parent
f5a80e3799
commit
f2e4eac5ef
@ -205,7 +205,7 @@ int main(int argc,char *argv[]) {
|
|||||||
bool bDaemon = cmd_main.hasKey("daemon");
|
bool bDaemon = cmd_main.hasKey("daemon");
|
||||||
LogLevel logLevel = (LogLevel) cmd_main["level"].as<int>();
|
LogLevel logLevel = (LogLevel) cmd_main["level"].as<int>();
|
||||||
logLevel = MIN(MAX(logLevel, LTrace), LError);
|
logLevel = MIN(MAX(logLevel, LTrace), LError);
|
||||||
string ini_file = cmd_main["config"];
|
static string ini_file = cmd_main["config"];
|
||||||
string ssl_file = cmd_main["ssl"];
|
string ssl_file = cmd_main["ssl"];
|
||||||
int threads = cmd_main["threads"];
|
int threads = cmd_main["threads"];
|
||||||
|
|
||||||
@ -286,7 +286,7 @@ int main(int argc,char *argv[]) {
|
|||||||
signal(SIGINT, SIG_IGN);// 设置退出信号
|
signal(SIGINT, SIG_IGN);// 设置退出信号
|
||||||
sem.post();
|
sem.post();
|
||||||
});// 设置退出信号
|
});// 设置退出信号
|
||||||
signal(SIGHUP, [](int) { mediakit::loadIniConfig(); });
|
signal(SIGHUP, [](int) { mediakit::loadIniConfig(ini_file.data()); });
|
||||||
sem.wait();
|
sem.wait();
|
||||||
}
|
}
|
||||||
unInstallWebApi();
|
unInstallWebApi();
|
||||||
|
Loading…
Reference in New Issue
Block a user