mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-04 09:06:10 +02:00
Fix crash when using the sync command
This commit is contained in:
@@ -211,7 +211,7 @@ public class HostCommands
|
|||||||
|
|
||||||
if (newHostsCount > 0)
|
if (newHostsCount > 0)
|
||||||
{
|
{
|
||||||
ApiManager.SendNotificationMessage($"Added {newHostsCount} new hosts).");
|
ApiManager.SendNotificationMessage($"Added {newHostsCount} new host(s).");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class HostsManager
|
|||||||
{
|
{
|
||||||
int newHostsCount = 0;
|
int newHostsCount = 0;
|
||||||
|
|
||||||
foreach (NetworkSocket host in hosts)
|
foreach (NetworkSocket host in hosts.ToArray())
|
||||||
{
|
{
|
||||||
ApiManager.SendNotificationMessage($"{host.IPAddress}:{host.Port} > ???", NotificationMessageType.Warning);
|
ApiManager.SendNotificationMessage($"{host.IPAddress}:{host.Port} > ???", NotificationMessageType.Warning);
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ public class HostsManager
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ApiManager.SendNotificationMessageNewLine($"{host.IPAddress}:{host.Port} > No new host found", NotificationMessageType.Warning);
|
ApiManager.SendNotificationMessageNewLine($"{host.IPAddress}:{host.Port} > No new hosts found", NotificationMessageType.Warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
host.LastActive = DateTime.Now;
|
host.LastActive = DateTime.Now;
|
||||||
|
|||||||
Reference in New Issue
Block a user