Update SocketClient.cs

pull/1/head
a.bozhenov 5 years ago
parent 98a8f402ae
commit d59165b70d

@ -3,6 +3,7 @@ using System.Collections.Concurrent;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using ZeroLevel.Services.Pools; using ZeroLevel.Services.Pools;
using ZeroLevel.Services.Serialization; using ZeroLevel.Services.Serialization;
@ -338,7 +339,6 @@ namespace ZeroLevel.Network
{ {
try try
{ {
EnsureConnection();
var count = _stream.EndRead(ar); var count = _stream.EndRead(ar);
if (count > 0) if (count > 0)
{ {
@ -350,6 +350,7 @@ namespace ZeroLevel.Network
// TODO or not TODO // TODO or not TODO
Thread.Sleep(1); Thread.Sleep(1);
} }
EnsureConnection();
if (Status == SocketClientStatus.Working if (Status == SocketClientStatus.Working
|| Status == SocketClientStatus.Initialized) || Status == SocketClientStatus.Initialized)
{ {

Loading…
Cancel
Save

Powered by TurnKey Linux.