Ticket #11400: 0002-Don-t-die-on-network-errors-rather-try-again.patch

File 0002-Don-t-die-on-network-errors-rather-try-again.patch, 1.6 KB (added by dcf, 6 years ago)
  • proxy/flashproxy.js

    From c10b098b46072adbf6b3be449d4f0d3737a87412 Mon Sep 17 00:00:00 2001
    From: David Fifield <david@bamsoftware.com>
    Date: Tue, 20 May 2014 17:36:46 -0700
    Subject: [PATCH 2/2] Don't die on network errors; rather try again.
    
    Death-on-any-error was meant as a failsafe, to prevent runaway behavior
    like repeatedly connecting to a facilitator that is down for some
    reason. It turns out that long-term proxies like Cupcake want to keep
    connecting after a temporary loss of connectivity.
    ---
     proxy/flashproxy.js | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
    index 6307158..e5f366d 100644
    a b function FlashProxy() { 
    589589               like "Component returned failure code: 0x805e0006
    590590               [nsIXMLHttpRequest.open]" on Firefox. */
    591591            puts("Facilitator: exception while connecting: " + repr(err.message) + ".");
    592             this.die();
    593592            return;
    594593        }
    595594        xhr.responseType = "text";
    function FlashProxy() { 
    599598                    this.fac_complete(xhr.responseText);
    600599                } else {
    601600                    puts("Facilitator: can't connect: got status " + repr(xhr.status) + " and status text " + repr(xhr.statusText) + ".");
    602                     this.die();
    603601                }
    604602            }
    605603        }.bind(this);
    function FlashProxy() { 
    681679            proxy_pair.connect();
    682680        } catch (err) {
    683681            puts("ProxyPair: exception while connecting: " + safe_repr(err.message) + ".");
    684             this.die();
    685682            return;
    686683        }
    687684