Put a little delay into test-tls-securepair-client.js

Avoids race. openssl s_server is a terrible program.
This commit is contained in:
Ryan Dahl 2011-01-11 15:37:56 -08:00
parent b9540c28e9
commit 8e461673c4

View File

@ -49,7 +49,8 @@ server.stdout.on('data', function(s) {
switch (state) {
case 'WAIT-ACCEPT':
if (/ACCEPT/g.test(serverStdoutBuffer)) {
startClient();
// Give s_server half a second to start up.
setTimeout(startClient, 500);
state = 'WAIT-HELLO';
}
break;