mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 13:33:13 +00:00
Fix
This commit is contained in:
@ -1213,6 +1213,9 @@ public partial class DistributedConnection : NetworkConnection, IStore
|
||||
[Attribute]
|
||||
public bool AutoReconnect { get; set; } = false;
|
||||
|
||||
[Attribute]
|
||||
public uint ReconnectInterval { get; set; } = 5;
|
||||
|
||||
[Attribute]
|
||||
public string Username { get; set; }
|
||||
|
||||
@ -1317,7 +1320,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
|
||||
if (AutoReconnect)
|
||||
{
|
||||
Console.Write("Reconnecting socket...");
|
||||
Task.Delay(5000).ContinueWith((x) => connectSocket(socket));
|
||||
Task.Delay((int)ReconnectInterval).ContinueWith((x) => connectSocket(socket));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1553,7 +1556,7 @@ public partial class DistributedConnection : NetworkConnection, IStore
|
||||
else if (AutoReconnect && !invalidCredentials)
|
||||
{
|
||||
// reconnect
|
||||
Task.Delay(5000).ContinueWith((x) => Reconnect());
|
||||
Task.Delay((int)ReconnectInterval).ContinueWith((x) => Reconnect());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user