Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

客户端无法主动彻底断开连接 #32

Open
zzeric opened this issue Oct 19, 2020 · 0 comments
Open

客户端无法主动彻底断开连接 #32

zzeric opened this issue Oct 19, 2020 · 0 comments

Comments

@zzeric
Copy link

zzeric commented Oct 19, 2020

服务器端加了RPCDisconnect事件处理

在服务器端业务方法Exit里服务器断开连接
token.Session.Socket.Close();
server.Server.CloseSession(token.Session);

在客户端
foreach (var item in client.Clients)
{
item.TcpClient.DisConnect();
}
这些断开动作,都能触发RPCDisconnect,按理说连接应该断开了,但在关闭客户端时,还会再触发一次RPCDisconnect,说明连接之前没有彻底断开。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant