{"action":"created","issue":{"url":"https://api.github.com/repos/signal11/hidapi/issues/190","repository_url":"https://api.github.com/repos/signal11/hidapi","labels_url":"https://api.github.com/repos/signal11/hidapi/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/signal11/hidapi/issues/190/comments","events_url":"https://api.github.com/repos/signal11/hidapi/issues/190/events","html_url":"https://github.com/signal11/hidapi/pull/190","id":44383500,"number":190,"title":"libusb: remove the timeouts in hid_write()","user":{"login":"jsquyres","id":617316,"avatar_url":"https://avatars.githubusercontent.com/u/617316?v=3","gravatar_id":"","url":"https://api.github.com/users/jsquyres","html_url":"https://github.com/jsquyres","followers_url":"https://api.github.com/users/jsquyres/followers","following_url":"https://api.github.com/users/jsquyres/following{/other_user}","gists_url":"https://api.github.com/users/jsquyres/gists{/gist_id}","starred_url":"https://api.github.com/users/jsquyres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsquyres/subscriptions","organizations_url":"https://api.github.com/users/jsquyres/orgs","repos_url":"https://api.github.com/users/jsquyres/repos","events_url":"https://api.github.com/users/jsquyres/events{/privacy}","received_events_url":"https://api.github.com/users/jsquyres/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2014-09-30T02:46:17Z","updated_at":"2016-07-29T05:36:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/signal11/hidapi/pulls/190","html_url":"https://github.com/signal11/hidapi/pull/190","diff_url":"https://github.com/signal11/hidapi/pull/190.diff","patch_url":"https://github.com/signal11/hidapi/pull/190.patch"},"body":"The libusb/hid.c:hid_write() has timeouts in its calls to libusb_interrupt_transfer and libusb_control_transfer().  This timeout can sometimes be tripped (e.g., if the underlying hardware is slow), and no sensible error code is returned -- you just get a -1.  Hence, the caller can't know that it could just try again because the only error that occurred was a timeout (or that the message may have actually gotten through).\r\n\r\nAdditionally, the other hid.c:hid_write() implementations -- linux, mac, and windows -- are all blocking and do not timeout.  This makes the behavior of the libusb hid_write() different than the others, which seems weird.\r\n\r\nThis commit simply sets the libusb timeouts to 0 (i.e., infinite) to make the libusb hid_write() behave like the others."},"comment":{"url":"https://api.github.com/repos/signal11/hidapi/issues/comments/236098625","html_url":"https://github.com/signal11/hidapi/pull/190#issuecomment-236098625","issue_url":"https://api.github.com/repos/signal11/hidapi/issues/190","id":236098625,"user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T05:36:25Z","updated_at":"2016-07-29T05:36:25Z","body":"This is also causing issues for me due to the aforementioned GEMakers/gea-sdk#2."}}
{"actor":{"display_login":"Hixie"}}