mirror of
https://github.com/oliverbooth/TcpDotNet
synced 2024-11-09 23:25:42 +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)
|
||||
{
|
||||
response = new HandshakeResponsePacket(packet.ProtocolVersion,
|
||||
HandshakeResponse.UnsupportedProtocolVersion);
|
||||
const HandshakeResponse responseCode = HandshakeResponse.UnsupportedProtocolVersion;
|
||||
response = new HandshakeResponsePacket(packet.CallbackId, packet.ProtocolVersion, responseCode);
|
||||
await client.SendPacketAsync(response, cancellationToken);
|
||||
client.Close();
|
||||
return;
|
||||
}
|
||||
|
||||
response = new HandshakeResponsePacket(packet.ProtocolVersion, HandshakeResponse.Success);
|
||||
response = new HandshakeResponsePacket(packet.CallbackId, packet.ProtocolVersion, HandshakeResponse.Success);
|
||||
await client.SendPacketAsync(response, cancellationToken);
|
||||
|
||||
client.State = ClientState.Encrypting;
|
||||
|
Loading…
Reference in New Issue
Block a user