mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-10 02:35:43 +00:00
fix: pass callback id to handshake response ctor
This commit is contained in:
parent
bb734eac96
commit
56de55ca40
@ -22,14 +22,14 @@ internal sealed class HandshakeRequestPacketHandler : PacketHandler<HandshakeReq
|
|||||||
|
|
||||||
if (packet.ProtocolVersion != Node.ProtocolVersion)
|
if (packet.ProtocolVersion != Node.ProtocolVersion)
|
||||||
{
|
{
|
||||||
response = new HandshakeResponsePacket(packet.ProtocolVersion,
|
const HandshakeResponse responseCode = HandshakeResponse.UnsupportedProtocolVersion;
|
||||||
HandshakeResponse.UnsupportedProtocolVersion);
|
response = new HandshakeResponsePacket(packet.CallbackId, packet.ProtocolVersion, responseCode);
|
||||||
await client.SendPacketAsync(response, cancellationToken);
|
await client.SendPacketAsync(response, cancellationToken);
|
||||||
client.Close();
|
client.Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
response = new HandshakeResponsePacket(packet.ProtocolVersion, HandshakeResponse.Success);
|
response = new HandshakeResponsePacket(packet.CallbackId, packet.ProtocolVersion, HandshakeResponse.Success);
|
||||||
await client.SendPacketAsync(response, cancellationToken);
|
await client.SendPacketAsync(response, cancellationToken);
|
||||||
|
|
||||||
client.State = ClientState.Encrypting;
|
client.State = ClientState.Encrypting;
|
||||||
|
Loading…
Reference in New Issue
Block a user