-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
As it stands there appears to be no easy way to refresh the apiToken of a ManagementApi. Since the token used here has an expiration, a new ManagementApi requires instantiating with a new valid token when this occurs.
The problem arises with the use of the OkHttpClient instantiated with a ManagementApi. This leads to a memory leak, as each successive ManagementApi creates a new OkHttpClient that is never cleaned up.
A similar issue was addressed here: square/okhttp#2846
A setter for the apiToken would alleviate this issue, allowing it to be updated without the need to re-instantiate the ManagementApi
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels