Issue: The connection to a SVN repository will not be closed by the plugin #325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing an issue, when if you open a task with any defined Subversion configuration, opening a job settigns page will cause the connections opened by this action to hang indefinitely
We have our SVN repositry configured to only allow 10 connections from any given IP-address at a time, and we ran into an issue, when we would routinely ran out of those. After some code inspection (and general poking around), we discovered that any time one would open a job configuration page, the check of credentials would not close the connection opened to verify the credentials.
This issue is probably not noticeable for a lot of users, since probably any configuration has a buit-in timeout of hanged connections.
This a quick and dirty fix, made so as to be as least likely to break anything else in the refactoring process (the code base contains a method that seems to be doing the exact same thing at a glance while correclty closing connection)
What was done
Fixed method (hudson.scm.SubversionSCM.ModuleLocation.DescriptorImpl#checkCredentialsId) contains an added finally clause that closes the repo connection, if it is not null (mirror copy of the supposed clone method)
Testing
Only manual testing was done while opening a job setting page with a defined SVN repository configuration in it, as well as running this job. We will use this build of a plugin in our workflow for now.