{"action":"created","issue":{"url":"https://api.github.com/repos/node-hid/node-hid/issues/153","repository_url":"https://api.github.com/repos/node-hid/node-hid","labels_url":"https://api.github.com/repos/node-hid/node-hid/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/node-hid/node-hid/issues/153/comments","events_url":"https://api.github.com/repos/node-hid/node-hid/issues/153/events","html_url":"https://github.com/node-hid/node-hid/issues/153","id":171346385,"number":153,"title":"Error in electron,when i pull out device","user":{"login":"qqnp1100","id":14014255,"avatar_url":"https://avatars.githubusercontent.com/u/14014255?v=3","gravatar_id":"","url":"https://api.github.com/users/qqnp1100","html_url":"https://github.com/qqnp1100","followers_url":"https://api.github.com/users/qqnp1100/followers","following_url":"https://api.github.com/users/qqnp1100/following{/other_user}","gists_url":"https://api.github.com/users/qqnp1100/gists{/gist_id}","starred_url":"https://api.github.com/users/qqnp1100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qqnp1100/subscriptions","organizations_url":"https://api.github.com/users/qqnp1100/orgs","repos_url":"https://api.github.com/users/qqnp1100/repos","events_url":"https://api.github.com/users/qqnp1100/events{/privacy}","received_events_url":"https://api.github.com/users/qqnp1100/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-16T07:52:04Z","updated_at":"2016-08-17T02:50:31Z","closed_at":"2016-08-17T02:36:42Z","body":"use node-hid in electron app,when i pull out my device,my electron app interface into blank,and DevTools log :\r\n![2016-08-16 3 44 26](https://cloud.githubusercontent.com/assets/14014255/17691641/5c96abca-63c8-11e6-8755-5c7a55684d7d.png)\r\nbut use device.close() before pull out device,it's ok.\r\nI think code                     `\r\ndevice.on(\"data\", (data) => { console.log(data); });`\r\nis the problem,how to solve it ,thanks"},"comment":{"url":"https://api.github.com/repos/node-hid/node-hid/issues/comments/240299840","html_url":"https://github.com/node-hid/node-hid/issues/153#issuecomment-240299840","issue_url":"https://api.github.com/repos/node-hid/node-hid/issues/153","id":240299840,"user":{"login":"qqnp1100","id":14014255,"avatar_url":"https://avatars.githubusercontent.com/u/14014255?v=3","gravatar_id":"","url":"https://api.github.com/users/qqnp1100","html_url":"https://github.com/qqnp1100","followers_url":"https://api.github.com/users/qqnp1100/followers","following_url":"https://api.github.com/users/qqnp1100/following{/other_user}","gists_url":"https://api.github.com/users/qqnp1100/gists{/gist_id}","starred_url":"https://api.github.com/users/qqnp1100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qqnp1100/subscriptions","organizations_url":"https://api.github.com/users/qqnp1100/orgs","repos_url":"https://api.github.com/users/qqnp1100/repos","events_url":"https://api.github.com/users/qqnp1100/events{/privacy}","received_events_url":"https://api.github.com/users/qqnp1100/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T02:50:31Z","updated_at":"2016-08-17T02:50:31Z","body":"when run `device.on(\"data\", function(data) {});`\r\nis you create a new thread loop read device data?\r\nsuch as:\r\nwhile(flag){\r\nThread.sleep(time);\r\nhid_read();\r\n} \r\nwhen the device pull out,the loop have some error.\r\njust i think.\r\nso I use `device.read();`"}}
{"actor":{"display_login":"qqnp1100"}}