mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Fix to check running status before closing proxy
This fixes a bug reported in #31385. There was an error with the proxy deadlock fix in #31100 where we close proxies regardless of connection status.
This commit is contained in:
parent
6be7bedd06
commit
8a5941daab
1 changed files with 6 additions and 4 deletions
|
@ -80,9 +80,11 @@ class Snowflake {
|
|||
}
|
||||
//set a timeout for channel creation
|
||||
return setTimeout((() => {
|
||||
log('proxypair datachannel timed out waiting for open');
|
||||
pair.close();
|
||||
return pair.active = false;
|
||||
if (!pair.running) {
|
||||
log('proxypair datachannel timed out waiting for open');
|
||||
pair.close();
|
||||
return pair.active = false;
|
||||
}
|
||||
}), 20000); // 20 second timeout
|
||||
} else {
|
||||
return pair.active = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue