浏览代码

fix misbehaving code crash and create bug on transport level front proxy

Shelikhoo 4 年之前
父节点
当前提交
8cf51a847e
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/dns/nameserver_doh.go
  2. 1 1
      app/dns/nameserver_quic.go

+ 1 - 1
app/dns/nameserver_doh.go

@@ -223,7 +223,7 @@ func (s *DoHNameServer) sendQuery(ctx context.Context, domain string, clientIP n
 		go func(r *dnsRequest) {
 			// generate new context for each req, using same context
 			// may cause reqs all aborted if any one encounter an error
-			dnsCtx := context.Background()
+			dnsCtx := ctx
 
 			// reserve internal dns server requested Inbound
 			if inbound := session.InboundFromContext(ctx); inbound != nil {

+ 1 - 1
app/dns/nameserver_quic.go

@@ -169,7 +169,7 @@ func (s *QUICNameServer) sendQuery(ctx context.Context, domain string, clientIP
 		go func(r *dnsRequest) {
 			// generate new context for each req, using same context
 			// may cause reqs all aborted if any one encounter an error
-			dnsCtx := context.Background()
+			dnsCtx := ctx
 
 			// reserve internal dns server requested Inbound
 			if inbound := session.InboundFromContext(ctx); inbound != nil {