{"action":"created","issue":{"url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/1","repository_url":"https://api.github.com/repos/dex4er/js-promise-socket","labels_url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/1/comments","events_url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/1/events","html_url":"https://github.com/dex4er/js-promise-socket/issues/1","id":270882871,"number":1,"title":"Unhandled 'error' event","user":{"login":"heroboy","id":54468,"avatar_url":"https://avatars0.githubusercontent.com/u/54468?v=4","gravatar_id":"","url":"https://api.github.com/users/heroboy","html_url":"https://github.com/heroboy","followers_url":"https://api.github.com/users/heroboy/followers","following_url":"https://api.github.com/users/heroboy/following{/other_user}","gists_url":"https://api.github.com/users/heroboy/gists{/gist_id}","starred_url":"https://api.github.com/users/heroboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroboy/subscriptions","organizations_url":"https://api.github.com/users/heroboy/orgs","repos_url":"https://api.github.com/users/heroboy/repos","events_url":"https://api.github.com/users/heroboy/events{/privacy}","received_events_url":"https://api.github.com/users/heroboy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dex4er","id":174367,"avatar_url":"https://avatars2.githubusercontent.com/u/174367?v=4","gravatar_id":"","url":"https://api.github.com/users/dex4er","html_url":"https://github.com/dex4er","followers_url":"https://api.github.com/users/dex4er/followers","following_url":"https://api.github.com/users/dex4er/following{/other_user}","gists_url":"https://api.github.com/users/dex4er/gists{/gist_id}","starred_url":"https://api.github.com/users/dex4er/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dex4er/subscriptions","organizations_url":"https://api.github.com/users/dex4er/orgs","repos_url":"https://api.github.com/users/dex4er/repos","events_url":"https://api.github.com/users/dex4er/events{/privacy}","received_events_url":"https://api.github.com/users/dex4er/received_events","type":"User","site_admin":false},"assignees":[{"login":"dex4er","id":174367,"avatar_url":"https://avatars2.githubusercontent.com/u/174367?v=4","gravatar_id":"","url":"https://api.github.com/users/dex4er","html_url":"https://github.com/dex4er","followers_url":"https://api.github.com/users/dex4er/followers","following_url":"https://api.github.com/users/dex4er/following{/other_user}","gists_url":"https://api.github.com/users/dex4er/gists{/gist_id}","starred_url":"https://api.github.com/users/dex4er/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dex4er/subscriptions","organizations_url":"https://api.github.com/users/dex4er/orgs","repos_url":"https://api.github.com/users/dex4er/repos","events_url":"https://api.github.com/users/dex4er/events{/privacy}","received_events_url":"https://api.github.com/users/dex4er/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2017-11-03T05:37:43Z","updated_at":"2018-02-05T04:36:46Z","closed_at":null,"author_association":"NONE","body":"```\r\nevents.js:182\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: read ECONNRESET\r\n    at _errnoException (util.js:1019:11)\r\n    at TCP.onread (net.js:608:25)\r\n```\r\nmy code:\r\nhttps://gist.github.com/heroboy/c9a793b15f95afc190ba035e91181276\r\n```javascript\r\nasync function queryDns(buf)\r\n{\r\n\tvar sock = new PromiseSocket();\r\n\tawait sock.connect({ host: '8.8.8.8', port: 53 });\r\n\tvar sizeBuffer = Buffer.allocUnsafe(2);\r\n\tsizeBuffer.writeUInt16BE(buf.length);\r\n\tsock.write(sizeBuffer);\r\n\tsock.write(buf);\r\n\r\n\tsizeBuffer = await sock.read(2);\r\n\tvar ret = await sock.read(sizeBuffer.readUInt16BE(0));\r\n\tsock.end();\r\n\treturn ret;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/comments/362979461","html_url":"https://github.com/dex4er/js-promise-socket/issues/1#issuecomment-362979461","issue_url":"https://api.github.com/repos/dex4er/js-promise-socket/issues/1","id":362979461,"user":{"login":"heroboy","id":54468,"avatar_url":"https://avatars0.githubusercontent.com/u/54468?v=4","gravatar_id":"","url":"https://api.github.com/users/heroboy","html_url":"https://github.com/heroboy","followers_url":"https://api.github.com/users/heroboy/followers","following_url":"https://api.github.com/users/heroboy/following{/other_user}","gists_url":"https://api.github.com/users/heroboy/gists{/gist_id}","starred_url":"https://api.github.com/users/heroboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroboy/subscriptions","organizations_url":"https://api.github.com/users/heroboy/orgs","repos_url":"https://api.github.com/users/heroboy/repos","events_url":"https://api.github.com/users/heroboy/events{/privacy}","received_events_url":"https://api.github.com/users/heroboy/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T04:36:46Z","updated_at":"2018-02-05T04:36:46Z","author_association":"NONE","body":"@dex4er Even the origin version, it is very hard to reproduce the problem. I tried the new version, for now it didn't crash."}}
{"actor":{"display_login":"heroboy"}}