From f3d28246495bb876a28b915bc55bf72619d1c068 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sun, 26 Nov 2023 13:25:51 +0800 Subject: [PATCH] 1 --- server/robotserver/android_agent.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/server/robotserver/android_agent.cc b/server/robotserver/android_agent.cc index 86734425..f8aec20d 100644 --- a/server/robotserver/android_agent.cc +++ b/server/robotserver/android_agent.cc @@ -124,23 +124,16 @@ behaviac::EBTStatus AndroidAgent::CoConnectBattleServer() context->old_on_connect = owner_->GetWebSocket()->on_connect; context->old_on_disconnect = owner_->GetWebSocket()->on_disconnect; owner_->GetWebSocket()->on_error = - [this] (a8::WebSocketClient*,int err_code) + [this, context] (a8::WebSocketClient*,int err_code) { - f8::UdpLog::Instance()->Warning - ("WebSocketClient on_error %d", {err_code}); }; owner_->GetWebSocket()->on_connect = - [this] (a8::WebSocketClient* ) + [this, context] (a8::WebSocketClient* ) { - //net_connected_ = true; - f8::UdpLog::Instance()->Info - ("WebSocketClient on_connect", {}); }; owner_->GetWebSocket()->on_disconnect = - [this] (a8::WebSocketClient* ) + [this, context] (a8::WebSocketClient* ) { - f8::UdpLog::Instance()->Warning - ("WebSocketClient on_disconnect", {}); }; return behaviac::BT_SUCCESS; }