This repository has been archived by the owner on Dec 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc/client: Dial with
grpc.WithReturnConnectionError
option
Since 2b89b7e, RPC client used `grpc.WithBlock` option to dial the server. This option make dialer to return either `nil` or `context.DeadlineExceeded` errors, with any connection error resulting in the latter. In particular, TLS handshake failures were shadowed by deadline error. Now `WithReturnConnectionError` option is used instead: * it still blocks similar to `WithBlock`; * it adds connection failure to the deadline error. As a result, TLS unit test passes now. This should fix the problem originally posted in nspcc-dev/neofs-node#2561. Signed-off-by: Leonard Lyubich <[email protected]>
- Loading branch information