fix: use DiscoPing (partially reverts #11306) (#11744)

This commit is contained in:
Spike Curtis 2024-01-22 16:40:21 +04:00 committed by GitHub
parent 3d85cdfa11
commit 7ffd99cfe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ func (c *Conn) Status() *ipnstate.Status {
func (c *Conn) Ping(ctx context.Context, ip netip.Addr) (time.Duration, bool, *ipnstate.PingResult, error) {
errCh := make(chan error, 1)
prChan := make(chan *ipnstate.PingResult, 1)
go c.wireguardEngine.Ping(ip, tailcfg.PingTSMP, func(pr *ipnstate.PingResult) {
go c.wireguardEngine.Ping(ip, tailcfg.PingDisco, func(pr *ipnstate.PingResult) {
if pr.Err != "" {
errCh <- xerrors.New(pr.Err)
return