[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake-webext/master] Move proxy datachannel timeout value to config
commit 4c28d98f04fb91dea2cd47aa6be2ac7ae286f2ea
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date: Thu Apr 2 12:20:42 2020 -0400
Move proxy datachannel timeout value to config
---
config.js | 3 +++
snowflake.js | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/config.js b/config.js
index 39c2b15..5b8963a 100644
--- a/config.js
+++ b/config.js
@@ -26,6 +26,9 @@ Config.prototype.rateLimitHistory = 5.0;
Config.prototype.defaultBrokerPollInterval = 300.0 * 1000;
+// Timeout after sending answer before datachannel is opened
+Config.prototype.datachannelTimeout = 20 * 1000;
+
Config.prototype.maxNumClients = 1;
Config.prototype.proxyType = "";
diff --git a/snowflake.js b/snowflake.js
index 0e9730e..3baddbe 100644
--- a/snowflake.js
+++ b/snowflake.js
@@ -76,7 +76,7 @@ class Snowflake {
log('proxypair datachannel timed out waiting for open');
return pair.close();
}
- }), 20000); // 20 second timeout
+ }), this.config.datachannelTimeout);
}, function() {
//on error, close proxy pair
return pair.close();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits