[tor-commits] [pluggable-transports/snowflake-webext] 01/06: refactor: remove unnecessary checks in `ProxyPair.flush()`

gitolite role git at cupani.torproject.org
Thu Nov 10 15:23:17 UTC 2022


This is an automated email from the git hooks/post-receive script.

cohosh pushed a commit to branch main
in repository pluggable-transports/snowflake-webext.

commit b472999d99d842de721bddf79a8178af84c5065a
Author: WofWca <wofwca at protonmail.com>
AuthorDate: Wed Nov 9 00:17:27 2022 +0400

    refactor: remove unnecessary checks in `ProxyPair.flush()`
    
    `bufferedAmount` refers to the datachannel buffer, populated by
    calls to `send`. Data in this buffer does not necessitate additional
    calls to `flush`.
---
 proxypair.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxypair.js b/proxypair.js
index c2dbdcd..d147388 100644
--- a/proxypair.js
+++ b/proxypair.js
@@ -299,7 +299,7 @@ class ProxyPair {
       clearTimeout(this.flush_timeout_id);
       this.flush_timeout_id = null;
     }
-    if (this.r2cSchedule.length > 0 || this.c2rSchedule.length > 0 || (this.relayIsReady() && this.relay.bufferedAmount > 0) || (this.webrtcIsReady() && this.client.bufferedAmount > 0)) {
+    if (this.r2cSchedule.length > 0 || this.c2rSchedule.length > 0) {
       this.flush_timeout_id = setTimeout(this.flush, this.rateLimit.when() * 1000);
     }
   }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list