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

Connection leakage - during VoidRequest processing its response body wasn't closed #100

Closed
vgolovina opened this issue Dec 12, 2017 · 1 comment · Fixed by #101
Closed

Comments

@vgolovina
Copy link

vgolovina commented Dec 12, 2017

We use 1.3.1 version.
Every time we call auth.resetPassword(email, connection).execute() we afterwards get warning and stack trace in logs:

[warn] o.OkHttpClient - A connection to https://tenant.auth0.com/ was leaked. Did you forget to close a response body?
java.lang.Throwable: response.body().close()
at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:143)
at okhttp3.RealCall.captureCallStackTrace(RealCall.java:78)
at okhttp3.RealCall.execute(RealCall.java:66)
at com.auth0.net.BaseRequest.execute(BaseRequest.java:32)
at com.myapp.Wrapper.changePassword(Wrapper.java)

Seems like it is caused by https://github.com/auth0/auth0-java/blob/master/src/main/java/com/auth0/net/VoidRequest.java - when the response is successful, it won't be processed at all, but it should be closed to avoid the issue.

@lbalmaceda
Copy link
Contributor

I couldn't reproduce it but good catch! The body isn't closed on a successful VoidRequest case. Will fix.

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

Successfully merging a pull request may close this issue.

2 participants