{"action":"opened","issue":{"url":"https://api.github.com/repos/ziyasal/InfluxDB.Net/issues/28","repository_url":"https://api.github.com/repos/ziyasal/InfluxDB.Net","labels_url":"https://api.github.com/repos/ziyasal/InfluxDB.Net/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/ziyasal/InfluxDB.Net/issues/28/comments","events_url":"https://api.github.com/repos/ziyasal/InfluxDB.Net/issues/28/events","html_url":"https://github.com/ziyasal/InfluxDB.Net/issues/28","id":254720212,"number":28,"title":"Found memory leak in InfluxDbClientBase","user":{"login":"marcel-kok","id":20298124,"avatar_url":"https://avatars3.githubusercontent.com/u/20298124?v=4","gravatar_id":"","url":"https://api.github.com/users/marcel-kok","html_url":"https://github.com/marcel-kok","followers_url":"https://api.github.com/users/marcel-kok/followers","following_url":"https://api.github.com/users/marcel-kok/following{/other_user}","gists_url":"https://api.github.com/users/marcel-kok/gists{/gist_id}","starred_url":"https://api.github.com/users/marcel-kok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcel-kok/subscriptions","organizations_url":"https://api.github.com/users/marcel-kok/orgs","repos_url":"https://api.github.com/users/marcel-kok/repos","events_url":"https://api.github.com/users/marcel-kok/events{/privacy}","received_events_url":"https://api.github.com/users/marcel-kok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-01T18:36:18Z","updated_at":"2017-09-01T18:36:18Z","closed_at":null,"author_association":"NONE","body":"This change fixed it. (HttpClient was never disposed)\r\n\r\n private async Task<InfluxDbApiResponse> RequestAsync(\r\n            IEnumerable<ApiResponseErrorHandlingDelegate> errorHandlers,\r\n            HttpMethod method,\r\n            string path,\r\n            HttpContent content = null,\r\n            Dictionary<string, string> extraParams = null,\r\n            bool includeAuthToQuery = true,\r\n            bool headerIsBody = false,\r\n            TimeSpan? requestTimeout = null)\r\n        {\r\n            using (HttpClient client = GetHttpClient())\r\n            {\r\n                var response = await RequestInnerAsync(client, requestTimeout,\r\n                    HttpCompletionOption.ResponseHeadersRead,\r\n                    CancellationToken.None,\r\n                    method,\r\n                    path,\r\n                    content,\r\n                    extraParams,\r\n                    includeAuthToQuery);\r\n\r\n                string responseContent = String.Empty;\r\n\r\n                if (!headerIsBody)\r\n                {\r\n                    responseContent = await response.Content.ReadAsStringAsync();\r\n                }\r\n                else\r\n                {\r\n                    IEnumerable<string> values;\r\n\r\n                    if (response.Headers.TryGetValues(\"X-Influxdb-Version\", out values))\r\n                    {\r\n                        responseContent = values.First();\r\n                    }\r\n                }\r\n\r\n                HandleIfErrorResponse(response.StatusCode, responseContent, errorHandlers);\r\n\r\n                Debug.WriteLine(\"[Response] {0}\", response.ToJson());\r\n                Debug.WriteLine(\"[ResponseData] {0}\", responseContent);\r\n\r\n                return new InfluxDbApiResponse(response.StatusCode, responseContent);\r\n            }\r\n        }\r\n\r\n        private async Task<HttpResponseMessage> RequestInnerAsync(\r\n            HttpClient client,\r\n            TimeSpan? requestTimeout,\r\n            HttpCompletionOption completionOption,\r\n            CancellationToken cancellationToken,\r\n            HttpMethod method,\r\n            string path,\r\n            HttpContent content = null,\r\n            Dictionary<string, string> extraParams = null,\r\n            bool includeAuthToQuery = true)\r\n        {\r\n            if (requestTimeout.HasValue)\r\n            {\r\n                client.Timeout = requestTimeout.Value;\r\n            }\r\n\r\n            StringBuilder uri = BuildUri(path, extraParams, includeAuthToQuery);\r\n            HttpRequestMessage request = PrepareRequest(method, content, uri);\r\n\r\n            Debug.WriteLine(\"[Request] {0}\", request.ToJson());\r\n            if (content != null)\r\n            {\r\n                Debug.WriteLine(\"[RequestData] {0}\", content.ReadAsStringAsync().Result);\r\n            }\r\n\r\n            return await client.SendAsync(request, completionOption, cancellationToken);\r\n        }\r\n"}}
{"actor":{"display_login":"marcel-kok"}}