From 9ec9f012576a3d134ba13d7f9aca0eeaeba38596 Mon Sep 17 00:00:00 2001 From: Alexander Kastius Date: Thu, 1 Sep 2016 17:03:28 +0200 Subject: [PATCH] Added handler for exit command. --- app/assets/javascripts/editor/execution.js.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/execution.js.erb b/app/assets/javascripts/editor/execution.js.erb index 53b53ff7..c28c47a4 100644 --- a/app/assets/javascripts/editor/execution.js.erb +++ b/app/assets/javascripts/editor/execution.js.erb @@ -17,11 +17,13 @@ CodeOceanEditorWebsocket = { initializeSocketForTesting: function(url) { this.initializeSocket(url); this.websocket.on('default',this.handleTestResponse.bind(this)); + this.websocket.on('exit', this.handleExitCommand.bind(this)); }, initializeSocketForScoring: function(url) { this.initializeSocket(url); - this.websocket.on('default',this.handleScoringResponse.bind(this)) + this.websocket.on('default',this.handleScoringResponse.bind(this)); + this.websocket.on('exit', this.handleExitCommand.bind(this)); }, initializeSocketForRunning: function(url) {