-
Notifications
You must be signed in to change notification settings - Fork 28
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
StrictMode policy violation when closing Connection #201
Comments
hey @ninniuz thanks for reporting this issue. we're investigating it. |
@ninniuz we tried the setup you suggested, but was not able to observe the issue. are you using |
@wenxi-zeng thanks for your response!
I am getting this violation log on an emulator. |
@ninniuz thanks for the additional information. unfortunately, we can't do anything to address it. it depends on the underlaying library HttpURLConnection. all we can do in our library is to make sure we always close the connection after using it. in your case, connection.responseCode opens the connection, and we have a finally block that makes sure the connection gets closed (see this line). and the finally block calls this line, which calls disconnect to close the resource. if the concrete |
Describe the bug
After enabling closable objects detection with
in my application, I can see strict mode violations coming from Segment
To Reproduce
Steps to reproduce the behavior:
detectLeakedClosableObjects
Expected behavior
Resources should be closed correctly.
Platform:
The text was updated successfully, but these errors were encountered: