Fixd a minor bug on the Incoming TCP connection side where the Connect callback was called before the client ACKed the connection

This commit is contained in:
sschocke_cp 2009-04-05 08:49:40 +00:00
parent cc0fa5a4cc
commit e3a3184700

View file

@ -214,10 +214,6 @@ namespace Cosmos.Sys.Network
++connection.RemoteSequenceNumber, 0x12, 8192);
TCPIP.IPv4OutgoingBuffer.AddPacket(syn_ack);
ClientConnected connectCallback = tcpListeners[tcp_packet.DestinationPort];
connectCallback(new TcpClient(connection));
return;
}
}
@ -248,6 +244,10 @@ namespace Cosmos.Sys.Network
{
active_connection.LocalSequenceNumber++;
active_connection.ConnectionState = TCP.TCPConnection.State.ESTABLISHED;
ClientConnected connectCallback = tcpListeners[tcp_packet.DestinationPort];
connectCallback(new TcpClient(active_connection));
}
}
else if (active_connection.ConnectionState == TCP.TCPConnection.State.SYN_SENT)