client: Close connection on non-nil error in Dial #282

Merged
fyrchik merged 1 commit from fyrchik/frostfs-sdk-go:fix-connection-close into master 2024-10-10 11:57:08 +00:00

1 commit

Author SHA1 Message Date
99c5c58365
[#282] client: Close connection on non-nil error in Dial
All checks were successful
DCO / DCO (pull_request) Successful in 50s
Tests and linters / Tests (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 2m3s
A particular status code does not imply that a connection has not been
established. However, `Dial()` requires user to call `Close()` only if
the error was nil. Thus, it is `Dial()` responsibility to close
everything if it returns an error.

Introduced after the gRPC update in #270 (6009d089fc).

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-10 14:03:44 +03:00