commit b9cdddae825fef4cfdb8782e631b107911204658 Author: Arlo Breault arlolra@gmail.com Date: Sat Mar 16 10:33:11 2013 -0700
Use ready state constants from the constructor.
These aren't inheritable properties in ws. --- proxy/flashproxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js index 48e2625..237c629 100644 --- a/proxy/flashproxy.js +++ b/proxy/flashproxy.js @@ -749,11 +749,11 @@ function ProxyPair(client_addr, relay_addr, rate_limit) { }.bind(this);
function is_open(ws) { - return ws !== undefined && ws.readyState === ws.OPEN; + return ws !== undefined && ws.readyState === WebSocket.OPEN; }
function is_closed(ws) { - return ws === undefined || ws.readyState === ws.CLOSED; + return ws === undefined || ws.readyState === WebSocket.CLOSED; }
this.close = function() {
tor-commits@lists.torproject.org