diff --git a/examples/serverless/healthcheck/service.go b/examples/serverless/healthcheck/service.go index 60df561f5..74a94962e 100644 --- a/examples/serverless/healthcheck/service.go +++ b/examples/serverless/healthcheck/service.go @@ -15,7 +15,7 @@ import ( environ "github.com/ydb-platform/ydb-go-sdk-auth-environ" - "github.com/ydb-platform/ydb-go-sdk/v3" + ydb "github.com/ydb-platform/ydb-go-sdk/v3" "github.com/ydb-platform/ydb-go-sdk/v3/sugar" "github.com/ydb-platform/ydb-go-sdk/v3/table" "github.com/ydb-platform/ydb-go-sdk/v3/table/types" @@ -106,6 +106,9 @@ func (s *service) ping(path string) (code int32, err error) { if err != nil { return -1, err } + defer func() { + _ = response.Body.Close() + }() return int32(response.StatusCode), nil }