Do not load PingItems, threads have to user their own ctx anyway

This commit is contained in:
amki 2021-02-09 02:14:51 +01:00
parent bacef415fe
commit 6d75e6a381

View File

@ -152,8 +152,6 @@ namespace ISPChk
public void AddHost(Host host) public void AddHost(Host host)
{ {
System.Diagnostics.Debug.WriteLine("Host added!"); System.Diagnostics.Debug.WriteLine("Host added!");
if (host.PingItems == null)
host = _context.Hosts.Include(host => host.PingItems).Where(h => h.HostId == host.HostId).Single();
if(host.Ping) if(host.Ping)
StartPing(host); StartPing(host);
} }