diff options
author | Anderson Mesquita <andersonvom@gmail.com> | 2019-04-27 12:47:23 -0400 |
---|---|---|
committer | Anderson Mesquita <andersonvom@gmail.com> | 2019-04-28 09:10:02 -0400 |
commit | 34d33f796ee50308cc50877cd7985ddf49437c8d (patch) | |
tree | cbc4047611e553ebd0cde36321be13fdc7ae47a0 /app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java | |
parent | a4dc3d9e96b5a0c90cbf84822cbdd5d5cbbc5ebe (diff) | |
download | AntennaPod-34d33f796ee50308cc50877cd7985ddf49437c8d.zip |
Close OkHttp request before making new ones
When adding certain podcasts [1], a `LeakedClosableViolation` is thrown
due to the fact that we're reusing the OkHttpClient to make multiple
requests (one to get the iTunes toplist for the user's language, and
another one defaulting to US).
This makes sure that all requests are closed to prevent this exception,
according to OkHttp docs [2].
[1]: https://podcasts.apple.com/us/podcast/stupid-genius-with-emma-chamberlain/id1458568923
[2]: https://github.com/square/okhttp/blob/18f2b5e/okhttp/src/main/java/okhttp3/Call.kt#L32-L40
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/fragment/ItemlistFragment.java')
0 files changed, 0 insertions, 0 deletions