1
This commit is contained in:
parent
8625147110
commit
289c19b307
@ -113,6 +113,16 @@ behaviac::EBTStatus AndroidAgent::CoLogin()
|
||||
|
||||
behaviac::EBTStatus AndroidAgent::CoConnectBattleServer()
|
||||
{
|
||||
PRE_ENTER_COROUTINE();
|
||||
auto context = MAKE_BTCONTEXT
|
||||
(
|
||||
std::function<void (a8::WebSocketClient*, int)> old_on_error;
|
||||
std::function<void (a8::WebSocketClient*)> old_on_connect;
|
||||
std::function<void (a8::WebSocketClient*)> old_on_disconnect;
|
||||
);
|
||||
context->old_on_error = owner_->GetWebSocket()->on_error;
|
||||
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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user