mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-28 18:55:15 +00:00
platform not supported issue handled.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -3259,7 +3259,12 @@ namespace DnsServerCore
|
||||
|
||||
_state = ServiceState.Stopping;
|
||||
|
||||
_webServiceThread.Abort();
|
||||
try
|
||||
{
|
||||
_webServiceThread.Abort();
|
||||
}
|
||||
catch (PlatformNotSupportedException)
|
||||
{ }
|
||||
|
||||
_webService.Stop();
|
||||
_dnsServer.Stop();
|
||||
|
||||
Reference in New Issue
Block a user