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

[tor-commits] [flashproxy/master] Catch exceptions that happen during ProxyPair connections.



commit 07dc549ef49061f153adcbc16f3e4e31643c5607
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Tue Jun 5 22:29:43 2012 -0700

    Catch exceptions that happen during ProxyPair connections.
---
 flashproxy.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/flashproxy.js b/flashproxy.js
index 55aedc5..28beb29 100644
--- a/flashproxy.js
+++ b/flashproxy.js
@@ -437,7 +437,13 @@ function FlashProxy() {
             this.proxy_pairs.splice(this.proxy_pairs.indexOf(proxy_pair), 1);
             this.badge.proxy_end();
         }.bind(this);
-        proxy_pair.connect();
+        try {
+            proxy_pair.connect();
+        } catch (err) {
+            puts("ProxyPair: exception while connecting: " + repr(err.message) + ".");
+            this.die();
+            return;
+        }
 
         this.badge.proxy_begin();
     };

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