Skip to content

Commit

Permalink
fix: ConnectCC timeout not implemented correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Apr 1, 2022
1 parent c8eefd4 commit d58ac5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/agent/poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func ConnectCC(url string) (conn *h2conn.Conn, ctx context.Context, cancel conte

// kill connection on timeout
countdown := 10
for ctx.Err() == nil && countdown > 0 {
for conn == nil && countdown > 0 {
countdown--
time.Sleep(time.Second)
}
Expand Down

0 comments on commit d58ac5e

Please sign in to comment.