From ffec9d3fa3f74e7cc22a6464c0621180d4e68e8e Mon Sep 17 00:00:00 2001 From: b-ma Date: Tue, 21 May 2024 19:35:54 +0200 Subject: [PATCH] refactor: remove terminal window renaming --- src/client/Socket.js | 1 + src/server/Server.js | 23 ----------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/client/Socket.js b/src/client/Socket.js index c5a8e8a5..e4e91937 100644 --- a/src/client/Socket.js +++ b/src/client/Socket.js @@ -212,6 +212,7 @@ class Socket { connectionRefusedLogged = true; } + // retry in 1 second setTimeout(trySocket, 1000); } } diff --git a/src/server/Server.js b/src/server/Server.js index 582e09c5..59964ddc 100644 --- a/src/server/Server.js +++ b/src/server/Server.js @@ -80,27 +80,6 @@ const DEFAULT_CONFIG = { const TOKEN_VALID_DURATION = 20; // sec -// set terminal title -/** @private */ -function setTerminalTitle(server) { - let title = ''; - - if (server._auditState !== null) { - const numClients = server._auditState.get('numClients'); - let numClientStrings = []; - for (let name in numClients) { - numClientStrings.push(`${name}: ${numClients[name]}`); - } - - title = `${server.config.app.name} | ${numClientStrings.join(' - ')}`; - } else { - title = `${server.config.app.name}`; - } - - const msg = String.fromCharCode(27) + ']0;' + title + String.fromCharCode(7); - process.stdout.write(msg); -} - /** * The `Server` class is the main entry point for the server-side of a soundworks * application. @@ -337,7 +316,6 @@ class Server { this.stateManager.registerSchema(AUDIT_STATE_NAME, auditSchema); logger.configure(this.config.env.verbose); - setTerminalTitle(this); } /** @@ -386,7 +364,6 @@ class Server { } /** @private */ this._auditState = await this.stateManager.create(AUDIT_STATE_NAME, { numClients }); - this._auditState.onUpdate(() => setTerminalTitle(this)); // basic http authentication if (this.config.env.auth) {