[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.10 版本

This commit is contained in:
SmallMain
2022-10-01 17:51:47 +08:00
parent 0740917436
commit e2077e59b5
31 changed files with 200 additions and 141 deletions

View File

@@ -853,7 +853,10 @@ void WebSocketImpl::close()
void WebSocketImpl::closeAsync(int code, const std::string &reason)
{
lws_close_reason(_wsInstance, (lws_close_status)code, (unsigned char*)const_cast<char*>(reason.c_str()), reason.length());
if (_wsInstance)
{
lws_close_reason(_wsInstance, (lws_close_status)code, (unsigned char*)const_cast<char*>(reason.c_str()), reason.length());
}
closeAsync();
}