From 8b88f63280d44116118784749fff0ff86e536676 Mon Sep 17 00:00:00 2001 From: v2ray Date: Sun, 22 May 2016 19:32:13 +0200 Subject: [PATCH] Remove unnecessary dns server from default dispatcher --- app/dispatcher/impl/default.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/dispatcher/impl/default.go b/app/dispatcher/impl/default.go index 67e845ff9..dfc67cf93 100644 --- a/app/dispatcher/impl/default.go +++ b/app/dispatcher/impl/default.go @@ -2,7 +2,6 @@ package impl import ( "github.com/v2ray/v2ray-core/app" - "github.com/v2ray/v2ray-core/app/dns" "github.com/v2ray/v2ray-core/app/proxyman" "github.com/v2ray/v2ray-core/app/router" "github.com/v2ray/v2ray-core/common/log" @@ -14,7 +13,6 @@ import ( type DefaultDispatcher struct { ohm proxyman.OutboundHandlerManager router router.Router - dns dns.Server } func NewDefaultDispatcher(space app.Space) *DefaultDispatcher { @@ -33,12 +31,6 @@ func (this *DefaultDispatcher) Initialize(space app.Space) error { } this.ohm = space.GetApp(proxyman.APP_ID_OUTBOUND_MANAGER).(proxyman.OutboundHandlerManager) - if !space.HasApp(dns.APP_ID) { - log.Error("DefaultDispatcher: DNS is not found in the space.") - return app.ErrorMissingApplication - } - this.dns = space.GetApp(dns.APP_ID).(dns.Server) - if space.HasApp(router.APP_ID) { this.router = space.GetApp(router.APP_ID).(router.Router) }