Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProxySelector leak #17

kmoens opened this issue May 14, 2014 · 1 comment

ProxySelector leak #17

kmoens opened this issue May 14, 2014 · 1 comment


Copy link

@kmoens kmoens commented May 14, 2014

We found another possible leak by means of the ProxySelector Java class. To clear this one, we had to create a new method like this one:

    protected void clearDefaultProxySelector() {
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
            public Void run() {
                ProxySelector selector = ProxySelector.getDefault();
                if (isLoadedInWebApplication(selector)) {
                    warn("Removing default");
                return null;

Additionally the clearDefaultProxySelector() method is called from the contextDestroyed() method.

Kind regards,

Kenny Moens

Copy link

@mjiderhamn mjiderhamn commented May 14, 2014

Thanks for the report! I've added your suggested changes to the sources, to be included in the next release (not yet planned). I've also added this to the list of mistakes at

@mjiderhamn mjiderhamn closed this May 14, 2014
mjiderhamn added a commit that referenced this issue May 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.