Merge pull request #5 from RIAEvangelist/brandon
Fixed socket deletion from server
This commit is contained in:
commit
4976001ddb
2 changed files with 15 additions and 7 deletions
|
@ -290,14 +290,17 @@ function init(path,config,log,port){
|
||||||
for(var i=0, count=server.sockets.length; i<count; i++){
|
for(var i=0, count=server.sockets.length; i<count; i++){
|
||||||
var socket=server.sockets[i];
|
var socket=server.sockets[i];
|
||||||
|
|
||||||
|
if(socket){
|
||||||
if(socket.readable)
|
if(socket.readable)
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
server.log('Socket disconnected'.notice);
|
server.log('Socket disconnected'.notice);
|
||||||
|
|
||||||
|
if(socket)
|
||||||
socket.destroy();
|
socket.destroy();
|
||||||
|
|
||||||
delete server.sockets[i];
|
server.sockets.splice(i,1);
|
||||||
|
|
||||||
server.trigger(
|
server.trigger(
|
||||||
'socket.disconnected'
|
'socket.disconnected'
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "node-ipc",
|
"name": "node-ipc",
|
||||||
"version": "0.9.0",
|
"version": "0.9.7",
|
||||||
"description": "A nodejs module for local and remote Inter Process Communication (IPC) uses Unix Sockets for local communication avoiding the network card for lower overhead and latency. ## Solid but, ### Still under development and lacking documentation, but useable.",
|
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
|
||||||
"main": "node-ipc.js",
|
"main": "node-ipc.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
"example": "example"
|
"example": "example"
|
||||||
|
@ -16,10 +16,15 @@
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"IPC",
|
"IPC",
|
||||||
|
"Neural Networking",
|
||||||
|
"Machine Learning",
|
||||||
"inter",
|
"inter",
|
||||||
"process",
|
"process",
|
||||||
"communication",
|
"communication",
|
||||||
"unix",
|
"unix",
|
||||||
|
"TCP",
|
||||||
|
"UDP",
|
||||||
|
"domain",
|
||||||
"sockets",
|
"sockets",
|
||||||
"threaded",
|
"threaded",
|
||||||
"communication",
|
"communication",
|
||||||
|
@ -37,5 +42,5 @@
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/RIAEvangelist/node-ipc/issues"
|
"url": "https://github.com/RIAEvangelist/node-ipc/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/RIAEvangelist/node-ipc"
|
"homepage": "riaevangelist.github.io/node-ipc/"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue