소스 검색

fix fakedns is nil

Shelikhoo 4 년 전
부모
커밋
1df432218e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/dispatcher/fakednssniffer.go

+ 1 - 1
app/dispatcher/fakednssniffer.go

@@ -18,7 +18,7 @@ import (
 func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error) {
 	var fakeDNSEngine dns.FakeDNSEngine
 	{
-		fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature(fakeDNSEngine)
+		fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature((*dns.FakeDNSEngine)(nil))
 		if fakeDNSEngineFeat != nil {
 			fakeDNSEngine = fakeDNSEngineFeat.(dns.FakeDNSEngine)
 		}