[ http://jira.codehaus.org/browse/WAGON-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_88539 ]
Phil Webb commented on WAGON-73: -------------------------------- My mirror list is fairly simple, it only consists of a single mirror to an inhouse installation of maven-proxy <mirrors> <mirror> <id>maven-proxy</id> <name>Maven-Proxy Mirror</name> <url>http://releaseserver:8080/maven-proxy-webapp/repository/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> I have not provided a patch (sorry Eugene) because I am not totally sure of how the code should work, so I am not totally confident of my proposed fix. I am looking at it fairly blind, just trying to fix a problem that I had. If you want me to attach one please let me know. I still have a bit of a problem understanding the code, even after the updates. Should the connect method not return if it is successful? If you follow the path of the code, if the hasMirror() method returns true, then the this.impl.connect(); is called. If this method connects then I assume that no exceptions are thrown? After this the method will loop around the while ( hasMirror() ) again? I would have thought that if the connection is successful here then there should be no need to loop around again. Likewise with the get method. Sorry if I am missing something, I am just trying to understand. > MirroredWagon infinite loop > --------------------------- > > Key: WAGON-73 > URL: http://jira.codehaus.org/browse/WAGON-73 > Project: wagon > Issue Type: Bug > Reporter: Phillip Webb > Assigned To: Joakim Erdfelt > Priority: Critical > > The MirroredWagon class includes a get method that runs into an infinite loop. > I think a return is required after this.impl.get( resource, destination ); > public void get( String resource, File destination ) > throws TransferFailedException, ResourceDoesNotExistException, > AuthorizationException > { > try > { > while ( true ) > { > try > { > this.impl.get( resource, destination ); > } > catch ( TransferFailedException e ) > { > nextMirror(); > } > } > } > catch ( ExhaustedMirrorsException e ) > { > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira