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

[tor-commits] [flashproxy/master] Use ready state constants from the constructor.



commit b9cdddae825fef4cfdb8782e631b107911204658
Author: Arlo Breault <arlolra@xxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits