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
public synchronized void close() {
stop();
scheduledExecutorService.shutdownNow();
started = false;
}
Expected behaviour would be to override the "close()" method in HttpProjectConfigManager.java, call "httpClient.close()" and continue the flow to the parent class (PollingProjectConfigManager.java#L210) to close its resources.
The text was updated successfully, but these errors were encountered:
Thank you for the details. We have created an internal ticket and assigned to our Java engineer to start looking into this in our current Sprint. We will provide an update in the coming days.
Hi @GenadiIvanov , I apologize for missing your above reply. We will promote the current beta to GA once we meet our beta exit criteria for our Advanced Audience Targeting functionality. Unfortunately, I don't have a timeline quite yet. My apologies.
Hello,
Recently we discovered a thread leak in the HttpProjectConfigManager.java which forgets to override the "close()" method and therefore to close the ClosableHttpClient (https://github.com/optimizely/java-sdk/blob/master/core-httpclient-impl/src/main/java/com/optimizely/ab/config/HttpProjectConfigManager.java#L64).
If the httpClient is built by the Optimizely code (https://github.com/optimizely/java-sdk/blob/master/core-httpclient-impl/src/main/java/com/optimizely/ab/config/HttpProjectConfigManager.java#L331) then the eviction configuration instructs the Apache httpClient to start a Connection evictor thread which won't be interrupted on shutdown.
Currently only the parent PollingProjectConfigManager.java calls "close()" to free up resources (https://github.com/optimizely/java-sdk/blob/master/core-api/src/main/java/com/optimizely/ab/config/PollingProjectConfigManager.java#L210).
Expected behaviour would be to override the "close()" method in HttpProjectConfigManager.java, call "httpClient.close()" and continue the flow to the parent class (PollingProjectConfigManager.java#L210) to close its resources.
The text was updated successfully, but these errors were encountered: