Do not block when ping upstream

Because the network may not be available at the time ping upstream
happens, so ctrld will stuck there waiting for pinging upstream.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-05-15 20:54:01 +07:00
1 parent 7a156d7d15
commit 270ea9f6ca
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -297,7 +297,7 @@ func (uc *UpstreamConfig) SetupTransport() {
func (uc *UpstreamConfig) setupDOHTransport() {
uc.setupDOHTransportWithoutPingUpstream()
uc.pingUpstream()
go uc.pingUpstream()
}
func (uc *UpstreamConfig) newDOHTransport(addrs []string) *http.Transport {
+1 -1
View File
@@ -20,7 +20,7 @@ import (
func (uc *UpstreamConfig) setupDOH3Transport() {
uc.setupDOH3TransportWithoutPingUpstream()
uc.pingUpstream()
go uc.pingUpstream()
}
func (uc *UpstreamConfig) newDOH3Transport(addrs []string) http.RoundTripper {