mirror of
https://github.com/louislam/dockge.git
synced 2026-05-22 06:22:17 +00:00
Close terminal if there is no clients connecting
This commit is contained in:
@@ -30,6 +30,7 @@ import { Cron } from "croner";
|
||||
import gracefulShutdown from "http-graceful-shutdown";
|
||||
import User from "./models/user";
|
||||
import childProcess from "child_process";
|
||||
import { Terminal } from "./terminal";
|
||||
|
||||
export class DockgeServer {
|
||||
app : Express;
|
||||
@@ -230,6 +231,11 @@ export class DockgeServer {
|
||||
|
||||
});
|
||||
|
||||
if (isDev) {
|
||||
setInterval(() => {
|
||||
log.debug("terminal", "Terminal count: " + Terminal.getTerminalCount());
|
||||
}, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
async afterLogin(socket : DockgeSocket, user : User) {
|
||||
|
||||
Reference in New Issue
Block a user