Wait a bit on close

This commit is contained in:
Florian Mounier
2016-08-19 17:46:15 +02:00
parent 3c2bf35b09
commit 1d324ed243
3 changed files with 14 additions and 10 deletions

View File

@@ -85,11 +85,13 @@
}
};
reopenOnClose = function() {
if (quit) {
return;
}
ws.shell = new WebSocket(wsUrl + '/ws' + path);
return init_shell_ws();
return setTimeout(function() {
if (quit) {
return;
}
ws.shell = new WebSocket(wsUrl + '/ws' + path);
return init_shell_ws();
}, 100);
};
write = function(data) {
if (term) {

File diff suppressed because one or more lines are too long

View File

@@ -92,9 +92,11 @@ document.addEventListener 'DOMContentLoaded', ->
window.open('','_self').close()
reopenOnClose = ->
return if quit
ws.shell = new WebSocket wsUrl + '/ws' + path
init_shell_ws()
setTimeout ->
return if quit
ws.shell = new WebSocket wsUrl + '/ws' + path
init_shell_ws()
, 100
write = (data) ->
if term