mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-08 07:46:23 +02:00
Prevent adding own host to host list
This commit is contained in:
@@ -29,11 +29,12 @@ public class HostsManager
|
||||
|
||||
public bool Add(NetworkSocket host)
|
||||
{
|
||||
if (!Contains(host))
|
||||
if (!Contains(host) && !host.Equals(ApiManager.GetLocalSocket()))
|
||||
{
|
||||
hosts.Add(host);
|
||||
return true;
|
||||
}
|
||||
|
||||
SaveHosts();
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user