{"action":"created","issue":{"url":"https://api.github.com/repos/rccursach/gpsd_client/issues/2","repository_url":"https://api.github.com/repos/rccursach/gpsd_client","labels_url":"https://api.github.com/repos/rccursach/gpsd_client/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/rccursach/gpsd_client/issues/2/comments","events_url":"https://api.github.com/repos/rccursach/gpsd_client/issues/2/events","html_url":"https://github.com/rccursach/gpsd_client/pull/2","id":163826361,"number":2,"title":"don't send new watch command before poling","user":{"login":"lcx","id":891345,"avatar_url":"https://avatars.githubusercontent.com/u/891345?v=3","gravatar_id":"","url":"https://api.github.com/users/lcx","html_url":"https://github.com/lcx","followers_url":"https://api.github.com/users/lcx/followers","following_url":"https://api.github.com/users/lcx/following{/other_user}","gists_url":"https://api.github.com/users/lcx/gists{/gist_id}","starred_url":"https://api.github.com/users/lcx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcx/subscriptions","organizations_url":"https://api.github.com/users/lcx/orgs","repos_url":"https://api.github.com/users/lcx/repos","events_url":"https://api.github.com/users/lcx/events{/privacy}","received_events_url":"https://api.github.com/users/lcx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-05T11:10:29Z","updated_at":"2016-07-10T04:17:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rccursach/gpsd_client/pulls/2","html_url":"https://github.com/rccursach/gpsd_client/pull/2","diff_url":"https://github.com/rccursach/gpsd_client/pull/2.diff","patch_url":"https://github.com/rccursach/gpsd_client/pull/2.patch"},"body":"Since we already started the watch with gpsd_client.start there is no need to issue a new ?WATCH command to create a new listener when .get_position was called.\r\nThe issue that occurs here is that each watch creates a couple of lines followed by poll which again creates a line.\r\ngets only reads one line at a time, leaving data on the socket which was no read.\r\nIf sleeping for let's say 10 sec, a poll will deliver data from 10 sec ago.\r\nAfter some time the data on the socket adds up and the client crashes."},"comment":{"url":"https://api.github.com/repos/rccursach/gpsd_client/issues/comments/231569807","html_url":"https://github.com/rccursach/gpsd_client/pull/2#issuecomment-231569807","issue_url":"https://api.github.com/repos/rccursach/gpsd_client/issues/2","id":231569807,"user":{"login":"rccursach","id":3065751,"avatar_url":"https://avatars.githubusercontent.com/u/3065751?v=3","gravatar_id":"","url":"https://api.github.com/users/rccursach","html_url":"https://github.com/rccursach","followers_url":"https://api.github.com/users/rccursach/followers","following_url":"https://api.github.com/users/rccursach/following{/other_user}","gists_url":"https://api.github.com/users/rccursach/gists{/gist_id}","starred_url":"https://api.github.com/users/rccursach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rccursach/subscriptions","organizations_url":"https://api.github.com/users/rccursach/orgs","repos_url":"https://api.github.com/users/rccursach/repos","events_url":"https://api.github.com/users/rccursach/events{/privacy}","received_events_url":"https://api.github.com/users/rccursach/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T04:17:01Z","updated_at":"2016-07-10T04:17:01Z","body":"following this advise and merging !!\r\nhttp://stackoverflow.com/questions/30669667/ioeagainwaitreadable-resource-temporarily-unavailable-read-would-block"}}
{"actor":{"display_login":"rccursach"}}