[snowflake/master] Log WebSocket→WebRTC messages in debug mode.

dcf at torproject.org dcf at torproject.org
Thu Dec 20 04:44:49 UTC 2018


commit 7c519b2975642dbe36f35216cbf48b334499408b
Author: David Fifield <david at bamsoftware.com>
Date:   Tue Dec 4 15:48:13 2018 -0700

    Log WebSocket→WebRTC messages in debug mode.
    
    Same as the other direction.
---
 proxy/proxypair.coffee | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxy/proxypair.coffee b/proxy/proxypair.coffee
index 195f8fe..4f401b0 100644
--- a/proxy/proxypair.coffee
+++ b/proxy/proxypair.coffee
@@ -139,8 +139,9 @@ class ProxyPair
 
   # websocket --> WebRTC
   onRelayToClientMessage: (event) =>
+    if DEBUG
+      log 'websocket --> WebRTC data: ' + event.data.byteLength + ' bytes'
     @r2cSchedule.push event.data
-    # log 'websocket --> WebRTC data: ' + event.data.byteLength + ' bytes'
     @flush()
 
   onError: (event) =>





More information about the tor-commits mailing list