mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-03 15:12:25 -08:00
cmd/derper: close connections once bootstrap DNS has been served
Signed-off-by: Josh Bleecher Snyder <[email protected]>
This commit is contained in:
1 parent
21358cf2f5
commit
ec62217f52
1 file changed
+4
@@ -58,5 +58,9 @@ func refreshBootstrapDNS() {
|
||||
func handleBootstrapDNS(w http.ResponseWriter, r *http.Request) {
|
||||
bootstrapDNSRequests.Add(1)
|
||||
j, _ := dnsCache.Load().([]byte)
|
||||
// Bootstrap DNS requests occur cross-regions,
|
||||
// and are randomized per request,
|
||||
// so keeping a connection open is pointlessly expensive.
|
||||
w.Header().Set("Connection", "close")
|
||||
w.Write(j)
|
||||
}
|
||||
Reference in new issue
Block a user