Skip to content

Commit

Permalink
Increase the connect timeout to the gapii socket.
Browse files Browse the repository at this point in the history
On Windows, it seems, 1 second is not enough to connect to the
adb forwarded port.
  • Loading branch information
pmuetschard committed Sep 26, 2018
1 parent 27b985e commit d69c33f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapii/client/capture.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (p *Process) connect(ctx context.Context, gvrHandle uint64, interceptorPath
// there's no application waiting for the connection. Treat errors as
// another waiting-for-connection case.
return task.Retry(ctx, 0, 500*time.Millisecond, func(ctx context.Context) (retry bool, err error) {
conn, err := net.DialTimeout("tcp", fmt.Sprintf("localhost:%d", p.Port), time.Second)
conn, err := net.DialTimeout("tcp", fmt.Sprintf("localhost:%d", p.Port), 3*time.Second)
if err != nil {
return false, log.Err(ctx, err, "Dial failed")
}
Expand Down

0 comments on commit d69c33f

Please sign in to comment.