mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
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:
parent
cc0fa5a4cc
commit
e3a3184700
1 changed files with 4 additions and 4 deletions
|
|
@ -214,10 +214,6 @@ namespace Cosmos.Sys.Network
|
||||||
++connection.RemoteSequenceNumber, 0x12, 8192);
|
++connection.RemoteSequenceNumber, 0x12, 8192);
|
||||||
TCPIP.IPv4OutgoingBuffer.AddPacket(syn_ack);
|
TCPIP.IPv4OutgoingBuffer.AddPacket(syn_ack);
|
||||||
|
|
||||||
ClientConnected connectCallback = tcpListeners[tcp_packet.DestinationPort];
|
|
||||||
|
|
||||||
connectCallback(new TcpClient(connection));
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -248,6 +244,10 @@ namespace Cosmos.Sys.Network
|
||||||
{
|
{
|
||||||
active_connection.LocalSequenceNumber++;
|
active_connection.LocalSequenceNumber++;
|
||||||
active_connection.ConnectionState = TCP.TCPConnection.State.ESTABLISHED;
|
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)
|
else if (active_connection.ConnectionState == TCP.TCPConnection.State.SYN_SENT)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue