Minor bug fixes

This commit is contained in:
Stone_Red
2023-12-01 14:07:52 +01:00
parent 9310160128
commit 8ec9a7964a
2 changed files with 6 additions and 0 deletions
@@ -150,6 +150,7 @@ public class HostCommands
{
ApiManager.SendNotificationMessageNewLine($"Success! Added {recivedHosts.Count} new host(s).", NotificationMessageType.Success);
hostsManager.AddRange(recivedHosts);
hostsManager.Add(new NetworkSocket(ipAddress.ToString(), port, DateTime.Now));
}
else
{
@@ -81,6 +81,11 @@ public class ApiManager
SendNotificationMessageNewLine($"An error occurred while mapping the private port ({ApiConfiguration.PrivatePort}) to the public port ({ApiConfiguration.PublicPort})! Error message: {ex.Message}", NotificationMessageType.Error);
return false;
}
catch (SocketException ex)
{
SendNotificationMessageNewLine($"An error occurred while mapping the private port ({ApiConfiguration.PrivatePort}) to the public port ({ApiConfiguration.PublicPort})! Error message: {ex.Message}", NotificationMessageType.Error);
return false;
}
}
public static void ClosePorts()