platform not supported issue handled.

This commit is contained in:
Shreyas Zare
2018-10-13 15:11:38 +05:30
parent 4496637112
commit 21c5cfdb5c
2 changed files with 21 additions and 3 deletions

View File

@@ -754,9 +754,22 @@ namespace DnsServerCore
_state = ServiceState.Stopping;
for (int i = 0; i < UDP_LISTENER_THREAD_COUNT; i++)
_udpListenerThreads[i].Abort();
{
try
{
_udpListenerThreads[i].Abort();
}
catch (PlatformNotSupportedException)
{ }
}
_tcpListenerThread.Abort();
try
{
_tcpListenerThread.Abort();
}
catch (PlatformNotSupportedException)
{ }
_udpListener.Dispose();
_tcpListener.Dispose();

View File

@@ -3259,7 +3259,12 @@ namespace DnsServerCore
_state = ServiceState.Stopping;
_webServiceThread.Abort();
try
{
_webServiceThread.Abort();
}
catch (PlatformNotSupportedException)
{ }
_webService.Stop();
_dnsServer.Stop();