eBay / ebay-oauth-java-client

eBay OAuth APIs client for Java
https://developer.ebay.com/api-docs/static/oauth-tokens.html
Apache License 2.0
48 stars 34 forks source link

Responses not being closed when using okhttp to send requests #28

Closed Sounie closed 2 years ago

Sounie commented 3 years ago

From the okhttp documentation ( https://square.github.io/okhttp/4.x/okhttp/okhttp3/-response-body/ )

"Each response body is backed by a limited resource like a socket (live network responses) or an open file (for cached responses). Failing to close the response body will leak resources and may ultimately cause the application to slow down or crash."

This should be a simple enough change to apply in OAuth2Api.java and OAuth2Util.java