1
This commit is contained in:
parent
b038b27c40
commit
a480c642bf
@ -86,8 +86,8 @@ static void SavePerfLog()
|
||||
bool App::Init(int argc, char* argv[])
|
||||
{
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
this->argc = argc;
|
||||
this->argv = argv;
|
||||
this->argc_ = argc;
|
||||
this->argv_ = argv;
|
||||
|
||||
if (!ParseOpt()) {
|
||||
terminated = true;
|
||||
@ -486,7 +486,7 @@ void App::UnInitLog()
|
||||
bool App::ParseOpt()
|
||||
{
|
||||
int ch = 0;
|
||||
while ((ch = getopt(argc, argv, "n:i:f:")) != -1) {
|
||||
while ((ch = getopt(argc_, argv_, "n:i:f:")) != -1) {
|
||||
switch (ch) {
|
||||
case 'n':
|
||||
{
|
||||
@ -503,7 +503,7 @@ bool App::ParseOpt()
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(optarg, strings, ',');
|
||||
for (auto& str : strings) {
|
||||
flags.insert(a8::XValue(str).GetInt());
|
||||
flags_.insert(a8::XValue(str).GetInt());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -514,7 +514,7 @@ bool App::ParseOpt()
|
||||
|
||||
bool App::HasFlag(int flag)
|
||||
{
|
||||
return flags.find(flag) != flags.end();
|
||||
return flags_.find(flag) != flags_.end();
|
||||
}
|
||||
|
||||
void App::FreeSocketMsgQueue()
|
||||
|
@ -63,16 +63,17 @@ private:
|
||||
void FreeUdpMsgQueue();
|
||||
|
||||
public:
|
||||
int argc = 0;
|
||||
char** argv = nullptr;
|
||||
volatile bool terminated = false;
|
||||
volatile bool shutdowned = false;
|
||||
std::set<int> flags;
|
||||
PerfMonitor perf;
|
||||
|
||||
private:
|
||||
int argc_ = 0;
|
||||
char** argv_ = nullptr;
|
||||
|
||||
int node_id_ = 0;
|
||||
int instance_id_ = 0;
|
||||
std::set<int> flags_;
|
||||
|
||||
std::shared_ptr<a8::uuid::SnowFlake> uuid_;
|
||||
std::mutex *loop_mutex_ = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user