From de11de6827b2bb4ee4372cdd7b557523310b77d7 Mon Sep 17 00:00:00 2001 From: azw Date: Fri, 14 Apr 2023 08:17:20 +0000 Subject: [PATCH] 1 --- server/wsproxy/master.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/server/wsproxy/master.cc b/server/wsproxy/master.cc index cbeddb2..1c2fd56 100644 --- a/server/wsproxy/master.cc +++ b/server/wsproxy/master.cc @@ -31,17 +31,15 @@ void Master::Init(int instance_id, const std::string& remote_ip, int remote_port tcp_client_->on_connect = std::bind(&Master::on_connect, this, std::placeholders::_1); tcp_client_->on_disconnect = std::bind(&Master::on_disconnect, this, std::placeholders::_1); tcp_client_->on_socketread = std::bind(&Master::on_socketread, this ,std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); - timer_wp_ = f8::Timer::Instance()->SetIntervalWp + timer_wp_ = f8::Timer::Instance()->SetIntervalWpEx (1000 * 9 + a8::RandEx(500, 150), - [] (int event, const a8::Args* args) + [this] (int event, const a8::Args* args) { if (a8::TIMER_EXEC_EVENT == event) { - #if 0 - Master* conn = (Master*)param.sender.GetUserData(); - conn->CheckAlive(); - #endif + CheckAlive(); } - }); + }, + &attacher_); } void Master::UnInit()