Skip to content

Commit

Permalink
Logstream: prevent context cancels from disrupting conn (#3953)
Browse files Browse the repository at this point in the history
Fixes a problem with log deltas being disrupted before being fully sent.
  • Loading branch information
mikejholly authored Mar 28, 2024
1 parent 3d23ae0 commit 50caafb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloud/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ func newLogstreamClient(ctx context.Context, addr string, transportCreds credent
grpc.WithTransportCredentials(transportCreds),
}

conn, err := grpc.DialContext(ctx, addr, dialOpts...)
// Client context cancellation is managed by another process.
conn, err := grpc.DialContext(context.WithoutCancel(ctx), addr, dialOpts...)
if err != nil {
return nil, errors.Wrap(err, "cloud: failed dialing logstream grpc")
}
Expand Down

0 comments on commit 50caafb

Please sign in to comment.