/// <summary> /// 接收客户端处理线程返回的断开事件并清理客户端连接列表 /// </summary> /// <param name="client">断开的客户端</param> /// <param name="reason">断开的原因</param> private void Client_ClientDisconnected(TCPClientThread client, string reason) { log.Info("检测到客户端 " + client.IPAddress + " 已断开连接,正在清理处理线程 断线原因:" + reason); client.Terminate(); _clients.Remove(client); }