fixed server delete soicket method
This commit is contained in:
parent
a3402290cd
commit
7484a520ea
2 changed files with 19 additions and 7 deletions
|
@ -290,14 +290,21 @@ function init(path,config,log,port){
|
|||
for(var i=0, count=server.sockets.length; i<count; i++){
|
||||
var socket=server.sockets[i];
|
||||
|
||||
console.log(count);
|
||||
|
||||
if(socket){
|
||||
if(socket.readable)
|
||||
continue;
|
||||
}
|
||||
|
||||
server.log('Socket disconnected'.notice);
|
||||
|
||||
if(socket)
|
||||
socket.destroy();
|
||||
|
||||
delete server.sockets[i];
|
||||
server.sockets.splice(i,1);
|
||||
|
||||
console.log('deleted'.error);
|
||||
|
||||
server.trigger(
|
||||
'socket.disconnected'
|
||||
|
|
11
package.json
11
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "node-ipc",
|
||||
"version": "0.9.0",
|
||||
"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.",
|
||||
"version": "0.9.7",
|
||||
"description": "A nodejs module for local and remote Inter Process Communication (IPC), Neural Networking, and able to facilitate machine learning.",
|
||||
"main": "node-ipc.js",
|
||||
"directories": {
|
||||
"example": "example"
|
||||
|
@ -16,10 +16,15 @@
|
|||
},
|
||||
"keywords": [
|
||||
"IPC",
|
||||
"Neural Networking",
|
||||
"Machine Learning",
|
||||
"inter",
|
||||
"process",
|
||||
"communication",
|
||||
"unix",
|
||||
"TCP",
|
||||
"UDP",
|
||||
"domain",
|
||||
"sockets",
|
||||
"threaded",
|
||||
"communication",
|
||||
|
@ -37,5 +42,5 @@
|
|||
"bugs": {
|
||||
"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