commit 39e61b9d3c5dd9882156733ef8323331099b6590 Author: David Fifield david@bamsoftware.com Date: Tue May 20 17:36:46 2014 -0700
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/proxy/flashproxy.js +++ b/proxy/flashproxy.js @@ -589,7 +589,6 @@ function FlashProxy() { like "Component returned failure code: 0x805e0006 [nsIXMLHttpRequest.open]" on Firefox. */ puts("Facilitator: exception while connecting: " + repr(err.message) + "."); - this.die(); return; } xhr.responseType = "text"; @@ -599,7 +598,6 @@ function FlashProxy() { this.fac_complete(xhr.responseText); } else { puts("Facilitator: can't connect: got status " + repr(xhr.status) + " and status text " + repr(xhr.statusText) + "."); - this.die(); } } }.bind(this); @@ -681,7 +679,6 @@ function FlashProxy() { proxy_pair.connect(); } catch (err) { puts("ProxyPair: exception while connecting: " + safe_repr(err.message) + "."); - this.die(); return; }