On Friday 12 December 2008 05:14, j16sdiz at freenetproject.org wrote:
> Author: j16sdiz
> Date: 2008-12-12 05:14:32 +0000 (Fri, 12 Dec 2008)
> New Revision: 24233
> 
> Modified:
>    trunk/plugins/XMLSpider/XMLSpider.java
> Log:
> unused variable, comment

So how do you determine that we've tried it 3 times and must kill it?
> 
> Modified: trunk/plugins/XMLSpider/XMLSpider.java
> ===================================================================
> --- trunk/plugins/XMLSpider/XMLSpider.java    2008-12-12 05:14:19 UTC (rev 
24232)
> +++ trunk/plugins/XMLSpider/XMLSpider.java    2008-12-12 05:14:32 UTC (rev 
24233)
> @@ -295,15 +295,13 @@
>  
>       private class MyClientCallback implements ClientCallback {
>               final Page page;
> -             final int tries;
>               
> -             public MyClientCallback(Page page, int tries) {
> +             public MyClientCallback(Page page) {
>                       this.page = page;
> -                     this.tries = tries;
>               }
>  
>               public void onFailure(FetchException e, ClientGetter state) {
> -                     XMLSpider.this.onFailure(e, state, page, tries);
> +                     XMLSpider.this.onFailure(e, state, page);
>               }
>  
>               public void onFailure(InsertException e, BaseClientPutter 
> state) {
> @@ -388,20 +386,20 @@
>               }
>       }
>  
> -     public void onFailure(FetchException fe, ClientGetter state, Page page, 
int tries) {
> -             Logger.minor(this, "Failed: [" + tries + "] " + page + " : " + 
> state, 
fe);
> +     public void onFailure(FetchException fe, ClientGetter state, Page page) 
> {
> +             Logger.minor(this, "Failed: " + page + " : " + state, fe);
>  
>               synchronized (this) {
>                       runningFetch.remove(page);
>  
>                       if (fe.newURI != null) {
> -                             // redirect, mark as successed
> +                             // redirect, mark as succeeded
>                               queueURI(fe.newURI, "redirect from " + 
> state.getURI());
>  
>                               page.status = Status.SUCCEEDED;
>                               page.lastChange = System.currentTimeMillis();
>                               db.store(page);
> -                     } else if (fe.isFatal() || tries > 3) {
> +                     } else if (fe.isFatal()) {
>                               // too many tries or fatal, mark as failed
>                               page.status = Status.FAILED;
>                               page.lastChange = System.currentTimeMillis();
> 
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20081212/8f2a46c8/attachment.pgp>

Reply via email to