mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
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:
committed by
Cuong Manh Le
parent
7a156d7d15
commit
270ea9f6ca
@@ -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 {
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
|
||||
func (uc *UpstreamConfig) setupDOH3Transport() {
|
||||
uc.setupDOH3TransportWithoutPingUpstream()
|
||||
uc.pingUpstream()
|
||||
go uc.pingUpstream()
|
||||
}
|
||||
|
||||
func (uc *UpstreamConfig) newDOH3Transport(addrs []string) http.RoundTripper {
|
||||
|
||||
Reference in New Issue
Block a user