optimize startup

This commit is contained in:
Ben Wilson
2023-08-01 23:44:41 -04:00
parent 2e70fbdc53
commit 0f62fb1de1
3 changed files with 7 additions and 15 deletions
+1 -6
View File
@@ -39,7 +39,7 @@ export class StratumV1Service implements OnModuleInit {
}
private startSocketServer() {
new Server({ allowHalfOpen: true }, async (s: Socket) => {
new Server(async (s: Socket) => {
const promiseSocket = new PromiseSocket(s);
@@ -56,11 +56,6 @@ export class StratumV1Service implements OnModuleInit {
);
const clientCount = await this.clientService.connectedClientCount();
console.log(`New client connected: ${promiseSocket.socket.remoteAddress}, ${clientCount} total clients`);
promiseSocket.socket.on('end', async (error: Error) => {
// Handle socket disconnection
client.destroy();