Merge branch 'master' into lens_restructure

# Conflicts:
#	Makefile
#	dashboard/yarn.lock
#	package.json
#	yarn.lock
This commit is contained in:
Roman committed 2020-06-09 15:15:19 +03:00
commit e8624c845a
11 files changed
+132 -87

No files matched your search

+17 -4
View File
@@ -160,7 +160,7 @@ export class ShellSession extends EventEmitter {
}
protected exit(code = 1000) {
this.websocket.close(code)
if (this.websocket.readyState == this.websocket.OPEN) this.websocket.close(code)
this.emit('exit')
}
@@ -180,12 +180,25 @@ export class ShellSession extends EventEmitter {
protected exitProcessOnWebsocketClose() {
this.websocket.on("close", () => {
if (this.shellProcess) {
this.shellProcess.kill();
}
this.killShellProcess()
})
}
protected killShellProcess(){
if(this.running) {
// On Windows we need to kill the shell process by pid, since Lens won't respond after a while if using `this.shellProcess.kill()`
if (process.platform == "win32") {
try {
process.kill(this.shellProcess.pid)
} catch(e) {
return
}
} else {
this.shellProcess.kill()
}
}
}
protected sendResponse(msg: string) {
this.websocket.send("1" + Buffer.from(msg).toString("base64"))
}
+4 -1
View File
@@ -26,7 +26,10 @@ export class WindowManager {
center: true,
frame: false,
resizable: false,
show: false
show: false,
webPreferences: {
nodeIntegration: true
}
})
if (showSplash) {
this.splashWindow.loadFile(path.join(__static, "/splash.html"))