initialization fix

This commit is contained in:
solarin 2020-04-09 16:50:46 +04:00
parent 0dd6fdbac7
commit f697dac02c

View file

@ -37,7 +37,6 @@ namespace TLSharp.Core.Network
tcpClient.Close(); tcpClient.Close();
} }
tcpClient = new TcpClient(ipAddress.AddressFamily); tcpClient = new TcpClient(ipAddress.AddressFamily);
sendCounter = 0;
try try
{ {
@ -54,6 +53,7 @@ namespace TLSharp.Core.Network
{ {
stream = tcpClient.GetStream(); stream = tcpClient.GetStream();
} }
sendCounter = 0;
} }
public async Task Send(byte[] packet, CancellationToken token = default(CancellationToken)) public async Task Send(byte[] packet, CancellationToken token = default(CancellationToken))