先关闭令牌控制器,避免重连网络期间别的任务发送数据

This commit is contained in:
大石头 2017-05-06 17:15:55 +08:00
parent 8de821d190
commit d2d528000a
1 changed files with 2 additions and 1 deletions

View File

@ -593,10 +593,11 @@ bool TokenClient::ChangeIPEndPoint(const NetUri& uri)
// 为了能够处理Tcp/Udp切换重新建立连接
ctrl->Close();
delete socket;
socket = Socket::CreateRemote(uri);
ctrl->_Socket = socket;
ctrl->Close();
ctrl->Open();
/*ctrl->Port->Close();