A connection to was leaked. Did you forget to close a response body? & Waiting until last debugger command completes

There are two small things to be fixed for an android app under development.

1. In Android studio, logcat shows at two locations: "A connection to .... was leaked. Did you forget to close a response body?"

How to find where the leaks happened and how to fix?

2. The UI thread of the app uses an OkHttpClient, there is also exoplayer in the app, which uses another instance of okHttpClient. A break point is placed at the line of exoplayer new okHttpClient, in android studio debug window, when the break point is hit, there is a message "Waiting until last debugger command completes" shown, and debug window doesn't allow "Step into".

How to enable "step into" after the break point is hit, purpose of which is to see the whole process of new OkHttpClient ?

Source codes are not available to give away, you could use remote desktop to show fix to the above two items on our desktop.

Kemahiran: Android, Java

Tentang Klien:
( 3 ulasan ) Toronto, Canada

ID Projek: #29122575

Dianugerahkan kepada:


Hello, For point 1, either your project or a 3rd party you are using opens a socket connection (like for a HTTP request) and when it finishes processing it doesn't call close. If you're using something like HttpUrlCon Lagi

$26 USD dalam sehari
(3 Ulasan)