diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d65dc4f..c4a74c53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,19 @@ ## Unreleased ### Features -[#256](https://github.com/influxdata/influxdb-client-go/pull/256) Allowing 'Doer' interface for HTTP requests + - [#256](https://github.com/influxdata/influxdb-client-go/pull/256) Allowing 'Doer' interface for HTTP requests + +### Bug fixes + - [#259](https://github.com/influxdata/influxdb-client-go/pull/259) Fixed leaking connection in case of not reading whole query result on TLS connection + ## 2.3.0 [2021-04-30] ### Breaking change -[#253](https://github.com/influxdata/influxdb-client-go/pull/253) Interface 'Logger' extended with 'LogLevel() uint' getter. + - [#253](https://github.com/influxdata/influxdb-client-go/pull/253) Interface 'Logger' extended with 'LogLevel() uint' getter. ### Features -[#241](https://github.com/influxdata/influxdb-client-go/pull/241),[#248](https://github.com/influxdata/influxdb-client-go/pull/248) Synced with InfluxDB 2.0.5 swagger: - - Setup (onboarding) now sends correctly retentionDuration if specified - - `RetentionRule` used in `Bucket` now contains `ShardGroupDurationSeconds` to specify the shard group duration. + - [#241](https://github.com/influxdata/influxdb-client-go/pull/241),[#248](https://github.com/influxdata/influxdb-client-go/pull/248) Synced with InfluxDB 2.0.5 swagger: + - Setup (onboarding) now sends correctly retentionDuration if specified + - `RetentionRule` used in `Bucket` now contains `ShardGroupDurationSeconds` to specify the shard group duration. ### Documentation 1. [#242](https://github.com/influxdata/influxdb-client-go/pull/242) Documentation improvements: diff --git a/api/http/options.go b/api/http/options.go index 79ae772a..66ef5393 100644 --- a/api/http/options.go +++ b/api/http/options.go @@ -71,7 +71,7 @@ func (o *Options) OwnHTTPClient() bool { return o.ownClient } - +// Doer allows proving custom Do for HTTP operations type Doer interface { Do(*http.Request) (*http.Response, error) } diff --git a/api/query.go b/api/query.go index c93c86b6..f0976a28 100644 --- a/api/query.go +++ b/api/query.go @@ -355,6 +355,15 @@ func (q *QueryTableResult) Err() error { return q.err } +// Close reads remaining data and closes underlying Closer +func (q *QueryTableResult) Close() error { + var err error + for err == nil { + _, err = q.csvReader.Read() + } + return q.Closer.Close() +} + // stringTernary returns a if not empty, otherwise b func stringTernary(a, b string) string { if a == "" {