Fix the place where we close the WS connection, so we don't close

too fast before a reply can be formed
This commit is contained in:
Kris Moore
2016-01-19 12:25:55 -05:00
parent 0077d68208
commit f948edc354

View File

@@ -20,7 +20,6 @@ function onOpen(evt)
wstatus = "idle";
doSend(authjson);
doSend(stdargs);
websocket.close();
}
function onClose(evt)
@@ -37,9 +36,11 @@ function onMessage(evt)
var jsonobj = JSON.parse(evt.data);
if ( ignorefirst == "true" ) {
ignorefirst = "false";
return;
} else {
console.log(JSON.stringify(jsonobj, null, 2));
}
websocket.close();
}
function doSend(message)