File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -5813,9 +5813,14 @@ function establishInstanceWebSocketExecConnection() {
5813
5813
5814
5814
//Listen for "data" websocket messages
5815
5815
execDataSocket.onmessage = function (e) {
5816
- if (e.data instanceof ArrayBuffer) {
5817
- if (convertArrayBuffer2String(e.data) != null){
5818
- execTerminal.write(convertArrayBuffer2String(e.data));
5816
+ if (e.data.length == 0) {
5817
+ execControlSocket.close();
5818
+ execDataSocket.close();
5819
+ } else {
5820
+ if (e.data instanceof ArrayBuffer) {
5821
+ if (convertArrayBuffer2String(e.data) != null){
5822
+ execTerminal.write(convertArrayBuffer2String(e.data));
5823
+ }
5819
5824
}
5820
5825
}
5821
5826
};
Original file line number Diff line number Diff line change @@ -4759,9 +4759,14 @@ function establishInstanceWebSocketExecConnection() {
4759
4759
4760
4760
//Listen for "data" websocket messages
4761
4761
execDataSocket.onmessage = function (e) {
4762
- if (e . data instanceof ArrayBuffer ) {
4763
- if (convertArrayBuffer2String (e . data ) != null ){
4764
- execTerminal . write (convertArrayBuffer2String (e . data ));
4762
+ if (e . data . length == 0 ) {
4763
+ execControlSocket . close ();
4764
+ execDataSocket . close ();
4765
+ } else {
4766
+ if (e . data instanceof ArrayBuffer ) {
4767
+ if (convertArrayBuffer2String (e . data ) != null ){
4768
+ execTerminal . write (convertArrayBuffer2String (e . data ));
4769
+ }
4765
4770
}
4766
4771
}
4767
4772
} ;
You can’t perform that action at this time.
0 commit comments