Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae0bc5d

Browse files
committed
Ping async
1 parent 729f8a0 commit ae0bc5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codersdk/agentconn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ type AgentConn struct {
135135
func (c *AgentConn) Ping(ctx context.Context) (time.Duration, error) {
136136
errCh := make(chan error, 1)
137137
durCh := make(chan time.Duration, 1)
138-
c.Conn.Ping(TailnetIP, tailcfg.PingDisco, func(pr *ipnstate.PingResult) {
138+
go c.Conn.Ping(TailnetIP, tailcfg.PingDisco, func(pr *ipnstate.PingResult) {
139139
if pr.Err != "" {
140140
errCh <- xerrors.New(pr.Err)
141141
return

0 commit comments

Comments
 (0)