database connections

This commit is contained in:
Jan Prochazka
2020-05-01 17:38:25 +02:00
parent 3e07c2b76e
commit 7d36ddbc04
11 changed files with 173 additions and 39 deletions

View File

@@ -60,10 +60,9 @@ module.exports = {
if (existing) {
existing.disconnected = true;
if (kill) existing.subprocess.kill();
const last = this.opened.find((x) => x.conid == conid);
this.opened = this.opened.filter((x) => x.conid != conid);
this.closed[conid] = {
...(last && last.status),
...existing.status,
name: 'error',
};
socket.emitChanged(`server-status-changed`);