diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-28 20:34:49 +0530 |
|---|---|---|
| committer | Aman Kumar <145339995+amankumarsingh77@users.noreply.github.com> | 2026-08-02 19:12:46 +0530 |
| commit | a9bdbd8590801cd9c2fa0cda6203948ac19a779c (patch) | |
| tree | 060ced4709815f9415fc1172842ed25d97de545f /src/daemon/server.ts | |
| parent | 34e5cfdcbe29bbb5f2f46ba54eb67903abd9274d (diff) | |
refactor: tidy the whitespace the comment removal left behind
Drops leading blank lines where a file header was removed, collapses
double blank lines, and closes the empty catch/handler blocks whose only
content had been a comment. Whitespace only.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/daemon/server.ts')
| -rw-r--r-- | src/daemon/server.ts | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/daemon/server.ts b/src/daemon/server.ts index b694fc0..7c78372 100644 --- a/src/daemon/server.ts +++ b/src/daemon/server.ts @@ -1,4 +1,3 @@ - import { createServer, type Server, type Socket } from "node:net"; import { createInterface, type Interface } from "node:readline"; import { unlinkSync } from "node:fs"; @@ -11,7 +10,6 @@ import { DAEMON_STALE_SOCKET_CLEANUP, } from "./protocol"; - export type ClientSocket = { id: string; readonly socket: Socket; @@ -36,7 +34,6 @@ export type IpcServer = { clientCount(): number; }; - export const createIpcServer = (): IpcServer => { let server: Server | null = null; const sockets = new Map<string, ClientSocket>(); @@ -51,8 +48,7 @@ export const createIpcServer = (): IpcServer => { if (DAEMON_STALE_SOCKET_CLEANUP) { try { unlinkSync(DAEMON_SOCKET_PATH); - } catch { - } + } catch {} } server = createServer({ pauseOnConnect: false }, (socket: Socket) => { @@ -113,8 +109,7 @@ export const createIpcServer = (): IpcServer => { messageHandler?.(msg, currentClient); }); - socket.on("error", () => { - }); + socket.on("error", () => {}); socket.on("close", () => { const found = clients.get(currentClient.id) ?? sockets.get(tempId); @@ -176,8 +171,7 @@ export const createIpcServer = (): IpcServer => { if (!client) return; try { client.socket.write(JSON.stringify(msg) + "\n"); - } catch { - } + } catch {} }, broadcast(msg) { for (const [clientId] of clients) { |
