Skip to content

Commit

Permalink
Removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlst99 committed Apr 16, 2018
1 parent 9c08225 commit 424b752
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Ether.Network/Client/NetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,13 @@ public void Connect()
this._autoConnectEvent.WaitOne(Configuration.TimeOut);

SocketError errorCode = connectSocket.SocketError;

//Did the connection attempt fail?

if (!IsConnected)
{
//Should we reconnect more than once?
if (this.Configuration.RetryMode == ClientRetryOptions.ToLimit)
{
int count = 0;

//Loop until the retry count

while (!IsConnected && count < this.Configuration.MaxRetryAttempts)
{
if (this.Socket.ConnectAsync(connectSocket))
Expand All @@ -108,7 +105,6 @@ public void Connect()
}
else if (this.Configuration.RetryMode == ClientRetryOptions.Infinite)
{
//Loop infinitely while we haven't made a connection
while (!IsConnected)
{
if (this.Socket.ConnectAsync(connectSocket))
Expand All @@ -117,8 +113,7 @@ public void Connect()
errorCode = connectSocket.SocketError;
}
}

//Are we still not connected after possible retry attempts?

if (!IsConnected)
{
this.OnSocketError(errorCode);
Expand Down

0 comments on commit 424b752

Please sign in to comment.