You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Response is never closed when the API returns 429, leaking connections #67
BaseRequest.handleRequest throws RateLimitedException on a 429 without closing the Response. OkHttp never gets the connection back, and later it logs this for every rate-limited call:
WARN okhttp3.OkHttpClient : A connection to https://api.ipinfo.io/ was leaked. Did you forget to close a response body?
Callers can't close it themselves, because the exception doesn't carry the response.
We hit this when our account ran past its monthly quota. Every lookup came back 429, and we got about 2.3M of these warnings in one day. The log volume alone was noticeable on our bill.
The non-2xx branch right below doesn't have the problem, because response.body().string() closes the body. Only the 429 branch skips it.
Seen on 3.4.0 and current master (87511f4). PR with a fix and a test to follow.
Activity
linear-code commentedon Oct 30, 2026
INT-39