Closed
Description
WARNING [com.squareup.okhttp.OkHttpClient] (OkHttp ConnectionPool) A connection to https://api.github.com/ was leaked. Did you forget to close a response body?
I am using version 1.116. I sometimes see this warning message in my server log, there is no real occurrence pattern. I am not sure why that happened, but it seems it relates to bad network connection.
In my code, I have a static GitHub instance and use it periodically to communicate with Github.
protected static GitHub github;
...
// create the github instance from initialization like below
...
github = new GitHubBuilder()
.withOAuthToken(config.getPassword(), config.getUsername())
.withConnector(new OkHttpConnector(new OkUrlFactory(new OkHttpClient().setCache(cache))))
.build();
I can see similar message mentioned in a previous pull request #346 on Feb 23, 2017 trying to ignore the warning from okhttp.
Does this really a harmful messages ? How should I prevent this in github-api since I don't use okhttp directly.
Thank you.