From 57a813124e0e0f5c76e149567958405c7a4368cf Mon Sep 17 00:00:00 2001 From: Brandon Nozaki Miller Date: Mon, 4 Jan 2016 01:10:58 -0800 Subject: [PATCH] fixed maxConnection reference fixes #47 --- example/TCPSocket/basic/world-server.js | 1 + lib/socketServer.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/TCPSocket/basic/world-server.js b/example/TCPSocket/basic/world-server.js index 3579b44..7c8c855 100644 --- a/example/TCPSocket/basic/world-server.js +++ b/example/TCPSocket/basic/world-server.js @@ -9,6 +9,7 @@ var ipc=require('../../../node-ipc'); ipc.config.id = 'world'; ipc.config.retry= 1500; +ipc.config.maxConnections=1; ipc.serveNet( function(){ diff --git a/lib/socketServer.js b/lib/socketServer.js index 71d0637..62b413b 100644 --- a/lib/socketServer.js +++ b/lib/socketServer.js @@ -172,7 +172,9 @@ function init(path,config,log,port){ err ) } - ) + ); + + server.server.maxConnections=server.config.maxConnections; function serverCreated(socket) { server.sockets.push(socket); @@ -290,7 +292,6 @@ function init(path,config,log,port){ started ); - server.server.maxConnections=server.maxConnections; return; }