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

[tor-commits] [pluggable-transports/snowflake-webext] 06/06: perf: don't perform `flush_timeout_id = null` when it's already `null`



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 ec979a9316bfd81da1a38cf84bdf82ef1498dfc1
Author: WofWca <wofwca@xxxxxxxxxxxxxx>
AuthorDate: Fri Jul 15 19:23:02 2022 +0300

    perf: don't perform `flush_timeout_id = null` when it's already `null`
---
 proxypair.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxypair.js b/proxypair.js
index 2189e9c..716aa7a 100644
--- a/proxypair.js
+++ b/proxypair.js
@@ -231,8 +231,8 @@ class ProxyPair {
 
     if (this.flush_timeout_id) {
       clearTimeout(this.flush_timeout_id);
+      this.flush_timeout_id = null;
     }
-    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)) {
       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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits