diff --git a/DnsServerCore/Dhcp/DhcpServer.cs b/DnsServerCore/Dhcp/DhcpServer.cs index df670285..c26144fb 100644 --- a/DnsServerCore/Dhcp/DhcpServer.cs +++ b/DnsServerCore/Dhcp/DhcpServer.cs @@ -202,7 +202,7 @@ namespace DnsServerCore.Dhcp } catch (ObjectDisposedException) { - //socket disposed + //server stopped } catch (SocketException ex) { diff --git a/DnsServerCore/Dns/DnsServer.cs b/DnsServerCore/Dns/DnsServer.cs index 87631796..5a9c7d96 100644 --- a/DnsServerCore/Dns/DnsServer.cs +++ b/DnsServerCore/Dns/DnsServer.cs @@ -374,6 +374,10 @@ namespace DnsServerCore.Dns if (log != null) log.Write(localEP, protocol, ex); } + catch (ObjectDisposedException) + { + //server stopped + } catch (Exception ex) { if ((_state == ServiceState.Stopping) || (_state == ServiceState.Stopped)) diff --git a/DnsServerCore/WebService.cs b/DnsServerCore/WebService.cs index 3f54b543..c217b264 100644 --- a/DnsServerCore/WebService.cs +++ b/DnsServerCore/WebService.cs @@ -217,6 +217,10 @@ namespace DnsServerCore _log.Write(ex); } + catch (ObjectDisposedException) + { + //web service stopped + } catch (Exception ex) { if ((_state == ServiceState.Stopping) || (_state == ServiceState.Stopped)) @@ -244,6 +248,10 @@ namespace DnsServerCore _log.Write(ex); } + catch (ObjectDisposedException) + { + //web service stopped + } catch (Exception ex) { if ((_state == ServiceState.Stopping) || (_state == ServiceState.Stopped))