{"action":"opened","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/3883","labels_url":"https://api.github.com/repos/nodejs/node/issues/3883/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/3883/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/3883/events","html_url":"https://github.com/nodejs/node/issues/3883","id":117387748,"number":3883,"title":"The net data event has been lost?","user":{"login":"chenyihan","id":10774553,"avatar_url":"https://avatars.githubusercontent.com/u/10774553?v=3","gravatar_id":"","url":"https://api.github.com/users/chenyihan","html_url":"https://github.com/chenyihan","followers_url":"https://api.github.com/users/chenyihan/followers","following_url":"https://api.github.com/users/chenyihan/following{/other_user}","gists_url":"https://api.github.com/users/chenyihan/gists{/gist_id}","starred_url":"https://api.github.com/users/chenyihan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenyihan/subscriptions","organizations_url":"https://api.github.com/users/chenyihan/orgs","repos_url":"https://api.github.com/users/chenyihan/repos","events_url":"https://api.github.com/users/chenyihan/events{/privacy}","received_events_url":"https://api.github.com/users/chenyihan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-17T16:06:33Z","updated_at":"2015-11-17T16:06:33Z","closed_at":null,"body":"When I send some data to the server by socket, and receive the response by listening the data event, but it is can not receive the data event sometimes, sometimes can but sometimes can not, Why does this happen, My code is as below:\r\nvar conn = net.connect(this.options.port, this.options.host,\r\n\t\t\t\tfunction() {\r\n\t\t\t\t\tvar commandObj = new command.Command(cmd, args);\r\n\t\t\t\t\t// var buf;\r\n\t\t\t\t\tvar bufList = [];\r\n\t\t\t\t\tconn.on('data', function(data) {\r\n\t\t\t\t\t\tbufList.push(data);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tconn.on('end', function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tvar resp = protocol.parseResponse(buffer.Buffer\r\n\t\t\t\t\t\t\t\t\t.concat(bufList));\r\n\t\t\t\t\t\t\tif (callback) {\r\n\t\t\t\t\t\t\t\tcallback(resp, null);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tif (callback) {\r\n\t\t\t\t\t\t\t\tcallback(null, e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t\tconn.end(protocol.genSendData(commandObj));\r\n\t\t\t\t});"}}