Просмотр исходного кода

Note to self about multiple sendLoop.

David Fifield 6 лет назад
Родитель
Сommit
15c272edc4
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      dnstt-server/main.go

+ 3 - 0
dnstt-server/main.go

@@ -778,6 +778,9 @@ func run(privkey, pubkey []byte, domain dns.Name, upstream net.Addr, dnsConn net
 	ch := make(chan *record, 100)
 	defer close(ch)
 
+	// We could run multiple copies of sendLoop; that would allow more time
+	// for each response to collect downstream data before being evicted by
+	// another response that needs to be sent.
 	go func() {
 		err := sendLoop(dnsConn, ttConn, ch, maxEncodedPayload)
 		if err != nil {