private void ProcessDisconnectPacket(StandardDisconnectPacket packet)
{
// immediately acknowlege that we got it (with remote connection id as the connection id)
SendData(new StandardDisconnectAckPacket(packet.ConnectionId));
// if we are not disconnecting, start the process.
try
{
// do we have it in our list?
TcpConnectionHolder connectionHolder = _tcpConnections.GetRemoteConnection(packet.ConnectionId);
// this method will send the disconnectRs packet
connectionHolder.Connection.ProcessDisconnect(packet);
}
catch (Exception e)
{
Logger.Error("Failed to close connection [remote id = " + packet.ConnectionId + "] : " + e.Message);
}
}