[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 670c080f4907c28752fb50434bc7e511fff436ae
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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 + ".");



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits