[tor-commits] [flashproxy/master] Catch exceptions that happen during ProxyPair connections.
dcf at torproject.org
dcf at torproject.org
Wed Jun 6 05:47:28 UTC 2012
commit 07dc549ef49061f153adcbc16f3e4e31643c5607
Author: David Fifield <david at bamsoftware.com>
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();
};
More information about the tor-commits
mailing list