Index: lams_admin/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.17 -r1.1.2.18 --- lams_admin/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:26 -0000 1.1.2.17 +++ lams_admin/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:46 -0000 1.1.2.18 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_central/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.22 -r1.1.2.23 --- lams_central/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:22 -0000 1.1.2.22 +++ lams_central/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:58 -0000 1.1.2.23 @@ -151,10 +151,12 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; // when the server pushes new commands commandWebsocket.onmessage = function(e){ Index: lams_gradebook/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.7 -r1.1.2.8 --- lams_gradebook/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:21 -0000 1.1.2.7 +++ lams_gradebook/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:34 -0000 1.1.2.8 @@ -206,10 +206,12 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so reload - location.reload(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; // when the server pushes new commands commandWebsocket.onmessage = function(e){ Index: lams_learning/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.18 -r1.1.2.19 --- lams_learning/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:25 -0000 1.1.2.18 +++ lams_learning/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:54 -0000 1.1.2.19 @@ -206,11 +206,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so reload - location.reload(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_monitoring/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.17 -r1.1.2.18 --- lams_monitoring/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:30 -0000 1.1.2.17 +++ lams_monitoring/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:50 -0000 1.1.2.18 @@ -206,11 +206,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so reload - location.reload(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_assessment/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_assessment/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:12 -0000 1.1.2.19 +++ lams_tool_assessment/web/WEB-INF/tags/Page.tag 13 May 2017 06:29:00 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_bbb/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_bbb/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_bbb/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:18 -0000 1.1.2.20 +++ lams_tool_bbb/web/WEB-INF/tags/Page.tag 13 May 2017 06:29:04 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_chat/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_chat/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:34 -0000 1.1.2.20 +++ lams_tool_chat/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:35 -0000 1.1.2.21 @@ -206,11 +206,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so reload - location.reload(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_chat/web/includes/javascript/learning.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_chat/web/includes/javascript/learning.js,v diff -u -r1.15.2.6 -r1.15.2.7 --- lams_tool_chat/web/includes/javascript/learning.js 4 May 2017 13:33:34 -0000 1.15.2.6 +++ lams_tool_chat/web/includes/javascript/learning.js 13 May 2017 06:28:35 -0000 1.15.2.7 @@ -24,8 +24,10 @@ // init the connection with server using server URL but with different protocol chatToolWebsocket = new WebSocket(APP_URL.replace('http', 'ws') + 'learningWebsocket?toolSessionID=' + TOOL_SESSION_ID); - chatToolWebsocket.onclose = function(){ - location.reload(); + chatToolWebsocket.onclose = function(e){ + if (e.code === 1006) { + location.reload(); + } }; chatToolWebsocket.onmessage = function(e){ Index: lams_tool_daco/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_daco/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_daco/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:17 -0000 1.1.2.19 +++ lams_tool_daco/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:48 -0000 1.1.2.20 @@ -206,11 +206,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so reload - location.reload(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_forum/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.21 -r1.1.2.22 --- lams_tool_forum/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:20 -0000 1.1.2.21 +++ lams_tool_forum/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:57 -0000 1.1.2.22 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_gmap/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_gmap/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:15 -0000 1.1.2.20 +++ lams_tool_gmap/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:45 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_images/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_images/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:38 -0000 1.1.2.19 +++ lams_tool_images/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:42 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_imscc/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_imscc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:18 -0000 1.1.2.19 +++ lams_tool_imscc/web/WEB-INF/tags/Page.tag 13 May 2017 06:29:03 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_kaltura/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_kaltura/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:27 -0000 1.1.2.19 +++ lams_tool_kaltura/web/WEB-INF/tags/Page.tag 13 May 2017 06:29:01 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_lamc/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_lamc/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_lamc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:16 -0000 1.1.2.20 +++ lams_tool_lamc/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:51 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_laqa/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.21 -r1.1.2.22 --- lams_tool_laqa/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:10 -0000 1.1.2.21 +++ lams_tool_laqa/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:47 -0000 1.1.2.22 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_larsrc/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_larsrc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:11 -0000 1.1.2.19 +++ lams_tool_larsrc/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:36 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_leader/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_leader/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_leader/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:33 -0000 1.1.2.19 +++ lams_tool_leader/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:43 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_leader/web/pages/learning/leaderselection.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_leader/web/pages/learning/leaderselection.jsp,v diff -u -r1.2.2.6 -r1.2.2.7 --- lams_tool_leader/web/pages/learning/leaderselection.jsp 4 May 2017 13:33:33 -0000 1.2.2.6 +++ lams_tool_leader/web/pages/learning/leaderselection.jsp 13 May 2017 06:28:43 -0000 1.2.2.7 @@ -30,8 +30,10 @@ var leaderWebsocket = new WebSocket(''.replace('http', 'ws') + 'learningWebsocket?toolSessionID=' + ${toolSessionID}); - leaderWebsocket.onclose = function(){ - location.reload(); + leaderWebsocket.onclose = function(e){ + if (e.code === 1006) { + location.reload(); + } }; // run when the leader has just been selected Index: lams_tool_mindmap/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_mindmap/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:12 -0000 1.1.2.19 +++ lams_tool_mindmap/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:55 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_nb/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_nb/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_nb/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:35 -0000 1.1.2.20 +++ lams_tool_nb/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:57 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_notebook/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_notebook/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.22 -r1.1.2.23 --- lams_tool_notebook/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:19 -0000 1.1.2.22 +++ lams_tool_notebook/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:50 -0000 1.1.2.23 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_pixlr/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_pixlr/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_pixlr/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:29 -0000 1.1.2.19 +++ lams_tool_pixlr/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:41 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_preview/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_preview/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_preview/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:37 -0000 1.1.2.19 +++ lams_tool_preview/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:59 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_sbmt/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_sbmt/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:24 -0000 1.1.2.20 +++ lams_tool_sbmt/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:52 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_scratchie/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_scratchie/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_scratchie/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:31 -0000 1.1.2.19 +++ lams_tool_scratchie/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:53 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_scratchie/web/pages/learning/questionlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_scratchie/web/pages/learning/questionlist.jsp,v diff -u -r1.12.2.8 -r1.12.2.9 --- lams_tool_scratchie/web/pages/learning/questionlist.jsp 4 May 2017 13:33:31 -0000 1.12.2.8 +++ lams_tool_scratchie/web/pages/learning/questionlist.jsp 13 May 2017 06:28:53 -0000 1.12.2.9 @@ -30,8 +30,11 @@ //init the connection with server using server URL but with different protocol var scratchieWebsocket = new WebSocket(''.replace('http', 'ws') + 'learningWebsocket?toolSessionID=' + ${toolSessionID}); - scratchieWebsocket.onclose = function() { - location.reload(); + + scratchieWebsocket.onclose = function(e) { + if (e.code === 1006) { + location.reload(); + } }; // run when the server pushes new reports and vote statistics Index: lams_tool_scribe/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_scribe/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_scribe/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:34 -0000 1.1.2.20 +++ lams_tool_scribe/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:49 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_scribe/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_scribe/web/pages/learning/learning.jsp,v diff -u -r1.13.2.4 -r1.13.2.5 --- lams_tool_scribe/web/pages/learning/learning.jsp 12 May 2017 00:08:53 -0000 1.13.2.4 +++ lams_tool_scribe/web/pages/learning/learning.jsp 13 May 2017 06:28:49 -0000 1.13.2.5 @@ -16,8 +16,10 @@ agreementPercentageLabel = '', reportSubmitted = ${scribeSessionDTO.reportSubmitted}; - scribeWebsocket.onclose = function(){ - location.reload(); + scribeWebsocket.onclose = function(e){ + if (e.code === 1006) { + location.reload(); + } }; // run when the server pushes new reports and vote statistics Index: lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_spreadsheet/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:14 -0000 1.1.2.20 +++ lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:37 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_survey/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_survey/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_survey/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:28 -0000 1.1.2.20 +++ lams_tool_survey/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:40 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_task/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_task/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.20 -r1.1.2.21 --- lams_tool_task/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:23 -0000 1.1.2.20 +++ lams_tool_task/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:44 -0000 1.1.2.21 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_vote/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_vote/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:09 -0000 1.1.2.19 +++ lams_tool_vote/web/WEB-INF/tags/Page.tag 13 May 2017 06:29:02 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_tool_wiki/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_wiki/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.19 -r1.1.2.20 --- lams_tool_wiki/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:36 -0000 1.1.2.19 +++ lams_tool_wiki/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:40 -0000 1.1.2.20 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object Index: lams_www/web/WEB-INF/tags/Page.tag =================================================================== RCS file: /usr/local/cvsroot/lams_www/web/WEB-INF/tags/Attic/Page.tag,v diff -u -r1.1.2.8 -r1.1.2.9 --- lams_www/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:13 -0000 1.1.2.8 +++ lams_www/web/WEB-INF/tags/Page.tag 13 May 2017 06:28:56 -0000 1.1.2.9 @@ -151,11 +151,14 @@ // it is not an obvious place to init the websocket, but we need lesson ID commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId); - commandWebsocket.onclose = function(){ - // maybe iPad went into sleep mode? - // we need this websocket working, so init it again - initCommandWebsocket(); + commandWebsocket.onclose = function(e){ + if (e.code === 1006) { + // maybe iPad went into sleep mode? + // we need this websocket working, so init it again + initCommandWebsocket(); + } }; + // when the server pushes new commands commandWebsocket.onmessage = function(e){ // read JSON object