Commit 6b5efba
client: Respect
Fix the gRPC client dialer not using the timeout passed by the
containerd client timeout option.
Commit 63b4688 replaced the usage of deprecated `grpc.DialContext`
with `grpc.NewClient`.
However, the `dialer.ContextDialer` relied on the context deadline to
propagate the timeout:
https://github.com/containerd/containerd/blob/388fb336b0a458e2cf64212072743e622a3f44c7/vendor/google.golang.org/grpc/clientconn.go#L216
This assumption is now broken, because `grpc.NewClient` doesn't do any
initial connection and defers it to the first RPC usage.
This commit passes the timeout via the `MinConnectTimeout` grpc
connection param, which will be applied to **every** connection attempt
(not just the first).
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>client.WithTimeout option1 parent 76db058 commit 6b5efba
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
0 commit comments