Added check for active pair in onopen

Because the timeout makes the pair inactive, we should check for this
state in onopen before connecting to the client. Updated tests to set
the proxy pair to active before testing onopen. Also removed a
redundant statement.
This commit is contained in:
Cecylia Bocovich 2019-08-24 19:02:54 -04:00
parent 8a5941daab
commit 16a1b69823
3 changed files with 4 additions and 2 deletions

View file

@ -86,8 +86,6 @@ class Snowflake {
return pair.active = false;
}
}), 20000); // 20 second timeout
} else {
return pair.active = false;
}
}, function() {
return pair.active = false;