{"action":"created","issue":{"url":"https://api.github.com/repos/tessel/t2-cli/issues/269","labels_url":"https://api.github.com/repos/tessel/t2-cli/issues/269/labels{/name}","comments_url":"https://api.github.com/repos/tessel/t2-cli/issues/269/comments","events_url":"https://api.github.com/repos/tessel/t2-cli/issues/269/events","html_url":"https://github.com/tessel/t2-cli/pull/269","id":103988611,"number":269,"title":"More reliable Tessel discovery","user":{"login":"johnnyman727","id":432909,"avatar_url":"https://avatars.githubusercontent.com/u/432909?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyman727","html_url":"https://github.com/johnnyman727","followers_url":"https://api.github.com/users/johnnyman727/followers","following_url":"https://api.github.com/users/johnnyman727/following{/other_user}","gists_url":"https://api.github.com/users/johnnyman727/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyman727/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyman727/subscriptions","organizations_url":"https://api.github.com/users/johnnyman727/orgs","repos_url":"https://api.github.com/users/johnnyman727/repos","events_url":"https://api.github.com/users/johnnyman727/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyman727/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-31T05:28:42Z","updated_at":"2015-09-01T03:25:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tessel/t2-cli/pulls/269","html_url":"https://github.com/tessel/t2-cli/pull/269","diff_url":"https://github.com/tessel/t2-cli/pull/269.diff","patch_url":"https://github.com/tessel/t2-cli/pull/269.patch"},"body":"This PR makes Tessel discovery much more robust. Especially during `t2 update`, I was noticing that my LAN connection would come up on `t2 list` but when I ran `t2 update`, only my USB connection was found and that's what was used. USB connection takes forever for update so I'd basically need to run the command again.\r\n\r\nThe problem is that the CLI was just using a timeout for when Tessel discovery is complete. That leads to situations where a LAN connection is found but not opened before the timeout is hit.\r\n\r\nThis PR makes the discovery process wait for all pending connections to either open or fail before ending the search.\r\n\r\nAdditionally, I've pulled the default timeout back to 2 seconds because generally, you find the LAN connection within ~1s so 2s gives a nice margin of error. The fetch usually completes around 3s now."},"comment":{"url":"https://api.github.com/repos/tessel/t2-cli/issues/comments/136565385","html_url":"https://github.com/tessel/t2-cli/pull/269#issuecomment-136565385","issue_url":"https://api.github.com/repos/tessel/t2-cli/issues/269","id":136565385,"user":{"login":"johnnyman727","id":432909,"avatar_url":"https://avatars.githubusercontent.com/u/432909?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyman727","html_url":"https://github.com/johnnyman727","followers_url":"https://api.github.com/users/johnnyman727/followers","following_url":"https://api.github.com/users/johnnyman727/following{/other_user}","gists_url":"https://api.github.com/users/johnnyman727/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyman727/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyman727/subscriptions","organizations_url":"https://api.github.com/users/johnnyman727/orgs","repos_url":"https://api.github.com/users/johnnyman727/repos","events_url":"https://api.github.com/users/johnnyman727/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyman727/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T03:25:28Z","updated_at":"2015-09-01T03:25:28Z","body":"Ready for review! @LinusU would you do me the honors?"}}