[tor-commits] [flashproxy/master] die on XHR error.

dcf at torproject.org dcf at torproject.org
Fri Jun 7 20:06:11 UTC 2013


commit 670c080f4907c28752fb50434bc7e511fff436ae
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Jun 7 11:45:54 2013 -0700

    die on XHR error.
---
 proxy/flashproxy.js |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 59b3d92..6170a67 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -564,10 +564,12 @@ function FlashProxy() {
         xhr.responseType = "text";
         xhr.onreadystatechange = function() {
             if (xhr.readyState === xhr.DONE) {
-                if (xhr.status === 200)
+                if (xhr.status === 200) {
                     this.fac_complete(xhr.responseText);
-                else
+                } else {
                     puts("Facilitator: can't connect: got status " + repr(xhr.status) + " and status text " + repr(xhr.statusText) + ".");
+                    this.die();
+                }
             }
         }.bind(this);
         puts("Facilitator: connecting to " + url + ".");





More information about the tor-commits mailing list