提交 1c5414b2 authored 作者: blu's avatar blu

init

上级 25a3ad0e
......@@ -215,14 +215,15 @@ private:
}
//ping
ret = ping();
thPing = thread([&,this]() {
while(true) {
this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
ping();
}
});
thPing.detach();
// TODO: don't need this anymore, since I've used the draft feature of ZOUTER_NOTIFICATION instead
// thPing = thread([&,this]() {
// while(true) {
// this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
// ping();
// }
// });
// thPing.detach();
return ret;
}
......
......@@ -53,7 +53,6 @@ private:
ret = z_send_multiple(pDealer, body);
if(ret < 0) {
spdlog::error("evpuller {} {} failed to send multiple: {}", devSn, iid, zmq_strerror(zmq_errno()));
}
return ret;
}
......@@ -95,14 +94,16 @@ protected:
// declare ready to router
ping();
thPing = thread([&,this]() {
while(true) {
this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
ping();
}
});
// TODO: don't need this anymore, since I've used the draft feature of ZOUTER_NOTIFICATION instead
// thPing = thread([&,this]() {
// while(true) {
// this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
// ping();
// }
// });
thPing.detach();
// thPing.detach();
// init response msg
while (true) {
if(checkStop() == true) {
......
......@@ -164,14 +164,15 @@ private:
}
//ping
ret = ping();
thPing = thread([&,this]() {
while(true) {
this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
ping();
}
});
thPing.detach();
// TODO: don't need this anymore, since I've used the draft feature of ZOUTER_NOTIFICATION instead
// thPing = thread([&,this]() {
// while(true) {
// this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
// ping();
// }
// });
// thPing.detach();
return ret;
}
......
......@@ -207,14 +207,15 @@ private:
}
//ping
ret = ping();
thPing = thread([&,this]() {
while(true) {
this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
ping();
}
});
thPing.detach();
// TODO: don't need this anymore, since I've used the draft feature of ZOUTER_NOTIFICATION instead
// thPing = thread([&,this]() {
// while(true) {
// this_thread::sleep_for(chrono::seconds(EV_HEARTBEAT_SECONDS-2));
// ping();
// }
// });
// thPing.detach();
return ret;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论