This project is read-only.

Cannot disconect

Jul 22, 2014 at 11:00 AM
Edited Jul 23, 2014 at 3:18 AM
when I close my program, disconnect event was not sent to server.
so I got error:

socket error Error: read ECONNRESET at errnoExeption (net.js: 558:19)

if i am using socket.io client (javascript) when I close browser, i didn't get this error

this is my code:

server.js:
var io= require('socket.io').listen(3000);
io.on('connection', function (socket) {  
    socket.on('disconnect', function () {
    // handle here
    })
 })
javascript client:
io.connect("127.0.0.1:3000");
c# client:
client = new Client("http://127.0.0.1:3000/");
socket = client.Connect();
Can anyone please help me? Thanks very much