{"action":"closed","number":114,"pull_request":{"url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114","id":295108380,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1MTA4Mzgw","html_url":"https://github.com/BrewBlox/brewblox-firmware/pull/114","diff_url":"https://github.com/BrewBlox/brewblox-firmware/pull/114.diff","patch_url":"https://github.com/BrewBlox/brewblox-firmware/pull/114.patch","issue_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/114","number":114,"state":"closed","locked":false,"title":"Fix for too many wifi.connect calls causing application thread block","user":{"login":"elcojacobs","id":1708921,"node_id":"MDQ6VXNlcjE3MDg5MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1708921?v=4","gravatar_id":"","url":"https://api.github.com/users/elcojacobs","html_url":"https://github.com/elcojacobs","followers_url":"https://api.github.com/users/elcojacobs/followers","following_url":"https://api.github.com/users/elcojacobs/following{/other_user}","gists_url":"https://api.github.com/users/elcojacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/elcojacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcojacobs/subscriptions","organizations_url":"https://api.github.com/users/elcojacobs/orgs","repos_url":"https://api.github.com/users/elcojacobs/repos","events_url":"https://api.github.com/users/elcojacobs/events{/privacy}","received_events_url":"https://api.github.com/users/elcojacobs/received_events","type":"User","site_admin":false},"body":"Having the wrong WiFi credentials caused 10 second hangups of the main loop.\n\nMy theory of why this happened:\n\nAfter 1000 executions of the main loop without WiFi, we called WiFi.connect.\n\nThese 1000 loop runs take very little time, so this means we called WiFi.connect very often.\n\nWiFi.connect is an aysnc system thread function, it should not block the application thread. But because we called it too often, we saturated the system thread queue. Because the new call cannot be scheduled in the background, it blocks the application thread instead.\n\nFixes:\n- Only call WiFi.connect when WiFi.connecting() returns false.\n- Instead of calling it every 1000 loops without WiFi, call it every 60 seconds.\n","created_at":"2019-07-07T14:32:42Z","updated_at":"2019-07-07T15:03:37Z","closed_at":"2019-07-07T15:03:37Z","merged_at":"2019-07-07T15:03:37Z","merge_commit_sha":"b94b9e481efd651bde7edc5303279355fb6d8d8f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114/commits","review_comments_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114/comments","review_comment_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/114/comments","statuses_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/statuses/dd46941c878199105637dc4745ed6340340cdcce","head":{"label":"elcojacobs:fix/wifi-blocking-app","ref":"fix/wifi-blocking-app","sha":"dd46941c878199105637dc4745ed6340340cdcce","user":{"login":"elcojacobs","id":1708921,"node_id":"MDQ6VXNlcjE3MDg5MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1708921?v=4","gravatar_id":"","url":"https://api.github.com/users/elcojacobs","html_url":"https://github.com/elcojacobs","followers_url":"https://api.github.com/users/elcojacobs/followers","following_url":"https://api.github.com/users/elcojacobs/following{/other_user}","gists_url":"https://api.github.com/users/elcojacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/elcojacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcojacobs/subscriptions","organizations_url":"https://api.github.com/users/elcojacobs/orgs","repos_url":"https://api.github.com/users/elcojacobs/repos","events_url":"https://api.github.com/users/elcojacobs/events{/privacy}","received_events_url":"https://api.github.com/users/elcojacobs/received_events","type":"User","site_admin":false},"repo":{"id":162991559,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI5OTE1NTk=","name":"brewblox-firmware","full_name":"elcojacobs/brewblox-firmware","private":false,"owner":{"login":"elcojacobs","id":1708921,"node_id":"MDQ6VXNlcjE3MDg5MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1708921?v=4","gravatar_id":"","url":"https://api.github.com/users/elcojacobs","html_url":"https://github.com/elcojacobs","followers_url":"https://api.github.com/users/elcojacobs/followers","following_url":"https://api.github.com/users/elcojacobs/following{/other_user}","gists_url":"https://api.github.com/users/elcojacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/elcojacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcojacobs/subscriptions","organizations_url":"https://api.github.com/users/elcojacobs/orgs","repos_url":"https://api.github.com/users/elcojacobs/repos","events_url":"https://api.github.com/users/elcojacobs/events{/privacy}","received_events_url":"https://api.github.com/users/elcojacobs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/elcojacobs/brewblox-firmware","description":null,"fork":true,"url":"https://api.github.com/repos/elcojacobs/brewblox-firmware","forks_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/forks","keys_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/teams","hooks_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/hooks","issue_events_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/issues/events{/number}","events_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/events","assignees_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/assignees{/user}","branches_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/branches{/branch}","tags_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/tags","blobs_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/languages","stargazers_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/stargazers","contributors_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/contributors","subscribers_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/subscribers","subscription_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/subscription","commits_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/contents/{+path}","compare_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/merges","archive_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/downloads","issues_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/issues{/number}","pulls_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/labels{/name}","releases_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/releases{/id}","deployments_url":"https://api.github.com/repos/elcojacobs/brewblox-firmware/deployments","created_at":"2018-12-24T13:06:26Z","updated_at":"2019-05-27T22:45:38Z","pushed_at":"2019-07-07T14:41:41Z","git_url":"git://github.com/elcojacobs/brewblox-firmware.git","ssh_url":"git@github.com:elcojacobs/brewblox-firmware.git","clone_url":"https://github.com/elcojacobs/brewblox-firmware.git","svn_url":"https://github.com/elcojacobs/brewblox-firmware","homepage":null,"size":32041,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"BrewBlox:develop","ref":"develop","sha":"c8715089f4e54dc8b57086cdd354a0153d638736","user":{"login":"BrewBlox","id":23666074,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNjY2MDc0","avatar_url":"https://avatars0.githubusercontent.com/u/23666074?v=4","gravatar_id":"","url":"https://api.github.com/users/BrewBlox","html_url":"https://github.com/BrewBlox","followers_url":"https://api.github.com/users/BrewBlox/followers","following_url":"https://api.github.com/users/BrewBlox/following{/other_user}","gists_url":"https://api.github.com/users/BrewBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/BrewBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrewBlox/subscriptions","organizations_url":"https://api.github.com/users/BrewBlox/orgs","repos_url":"https://api.github.com/users/BrewBlox/repos","events_url":"https://api.github.com/users/BrewBlox/events{/privacy}","received_events_url":"https://api.github.com/users/BrewBlox/received_events","type":"Organization","site_admin":false},"repo":{"id":162574983,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI1NzQ5ODM=","name":"brewblox-firmware","full_name":"BrewBlox/brewblox-firmware","private":false,"owner":{"login":"BrewBlox","id":23666074,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNjY2MDc0","avatar_url":"https://avatars0.githubusercontent.com/u/23666074?v=4","gravatar_id":"","url":"https://api.github.com/users/BrewBlox","html_url":"https://github.com/BrewBlox","followers_url":"https://api.github.com/users/BrewBlox/followers","following_url":"https://api.github.com/users/BrewBlox/following{/other_user}","gists_url":"https://api.github.com/users/BrewBlox/gists{/gist_id}","starred_url":"https://api.github.com/users/BrewBlox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrewBlox/subscriptions","organizations_url":"https://api.github.com/users/BrewBlox/orgs","repos_url":"https://api.github.com/users/BrewBlox/repos","events_url":"https://api.github.com/users/BrewBlox/events{/privacy}","received_events_url":"https://api.github.com/users/BrewBlox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BrewBlox/brewblox-firmware","description":null,"fork":false,"url":"https://api.github.com/repos/BrewBlox/brewblox-firmware","forks_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/forks","keys_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/teams","hooks_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/hooks","issue_events_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/events{/number}","events_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/events","assignees_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/assignees{/user}","branches_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/branches{/branch}","tags_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/tags","blobs_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/statuses/{sha}","languages_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/languages","stargazers_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/stargazers","contributors_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/contributors","subscribers_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/subscribers","subscription_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/subscription","commits_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/contents/{+path}","compare_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/merges","archive_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/downloads","issues_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues{/number}","pulls_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls{/number}","milestones_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/milestones{/number}","notifications_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/labels{/name}","releases_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/releases{/id}","deployments_url":"https://api.github.com/repos/BrewBlox/brewblox-firmware/deployments","created_at":"2018-12-20T12:11:34Z","updated_at":"2019-07-04T17:43:26Z","pushed_at":"2019-07-07T15:03:37Z","git_url":"git://github.com/BrewBlox/brewblox-firmware.git","ssh_url":"git@github.com:BrewBlox/brewblox-firmware.git","clone_url":"https://github.com/BrewBlox/brewblox-firmware.git","svn_url":"https://github.com/BrewBlox/brewblox-firmware","homepage":null,"size":32047,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":16,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":2,"open_issues":16,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114"},"html":{"href":"https://github.com/BrewBlox/brewblox-firmware/pull/114"},"issue":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/114"},"comments":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/BrewBlox/brewblox-firmware/statuses/dd46941c878199105637dc4745ed6340340cdcce"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"elcojacobs","id":1708921,"node_id":"MDQ6VXNlcjE3MDg5MjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1708921?v=4","gravatar_id":"","url":"https://api.github.com/users/elcojacobs","html_url":"https://github.com/elcojacobs","followers_url":"https://api.github.com/users/elcojacobs/followers","following_url":"https://api.github.com/users/elcojacobs/following{/other_user}","gists_url":"https://api.github.com/users/elcojacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/elcojacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elcojacobs/subscriptions","organizations_url":"https://api.github.com/users/elcojacobs/orgs","repos_url":"https://api.github.com/users/elcojacobs/repos","events_url":"https://api.github.com/users/elcojacobs/events{/privacy}","received_events_url":"https://api.github.com/users/elcojacobs/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":27,"deletions":26,"changed_files":5}}
{"actor":{"display_login":"elcojacobs"}}