Fixed socket calls.

This commit is contained in:
Alexander Kastius
2016-09-01 11:18:28 +02:00
parent 81fca2b8c7
commit 5f61c24dc6
2 changed files with 18 additions and 3 deletions

View File

@@ -137,13 +137,13 @@ CodeOceanEditorEvaluation = {
},
killWebsocketAndContainer: function () {
if (this.websocket.readyState != WebSocket.OPEN) {
if (this.websocket.getReadyState() != WebSocket.OPEN) {
return;
}
this.websocket.send(JSON.stringify({cmd: 'exit'}));
this.websocket.flush();
this.websocket.close();
this.websocket.killWebSocket();
this.hideSpinner();
this.running = false;
this.toggleButtonStates();