Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndicoKtorClient okhttp3.OkHttpClient warning: A connection to https://beta-indico.xxx.com/ was leaked #42

Open
denglitong opened this issue Dec 28, 2021 · 1 comment

Comments

@denglitong
Copy link

I start my server locally and perform load testing on it, maybe my load test code does not work well yet but I see the warning log which like:

16:20:14.628 [OkHttp ConnectionPool] WARN okhttp3.OkHttpClient - A connection to https://beta-indico.xxx.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

image

And I see that the OkHttpClient is used in IndicoKtorClient#L26, so I wonder perhaps there is something went wrong in the code when it request to Indico instance internal api?

@denglitong denglitong changed the title okhttp3.OkHttpClient warning: A connection to https://beta-indico.xxx.com/ was leaked IndicoKtorClient okhttp3.OkHttpClient warning: A connection to https://beta-indico.xxx.com/ was leaked Dec 28, 2021
@ShiqiRao
Copy link

ShiqiRao commented Dec 29, 2021

I found in AuthorizationInterceptor.java#L39, the client requests twice but don't close responses finally. Maybe it's the reason why the connection leaked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants