{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/94215016","pull_request_review_id":14745443,"id":94215016,"diff_hunk":"@@ -1199,6 +1199,12 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file)\n       m_seekSteps.push_back(atoi((*it).c_str()));\n   }\n \n+  pElement = pRootElement->FirstChildElement(\"suspend\");\n+  if (pElement)\n+  {\n+    XMLUtils::GetBoolean(pElement, \"waitnetonwakeup\", m_waitForNetAfterWakeUp);\n+  }","path":"xbmc/settings/AdvancedSettings.cpp","position":null,"original_position":8,"commit_id":"8d4b6e5a8748ad2edd0c4f5c546319e941d418b8","original_commit_id":"e6b7c1c013c55b4fe16e651d7406c4856145daaa","user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"body":"I thought you were a bot at first since the comments were so methodical and clean. +1","created_at":"2016-12-30T09:51:35Z","updated_at":"2016-12-30T09:51:35Z","html_url":"https://github.com/xbmc/xbmc/pull/11277#discussion_r94215016","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/11277","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/94215016"},"html":{"href":"https://github.com/xbmc/xbmc/pull/11277#discussion_r94215016"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/11277"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/11277","id":99436896,"html_url":"https://github.com/xbmc/xbmc/pull/11277","diff_url":"https://github.com/xbmc/xbmc/pull/11277.diff","patch_url":"https://github.com/xbmc/xbmc/pull/11277.patch","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/11277","number":11277,"state":"open","locked":false,"title":"wait for network after resuming from suspend","user":{"login":"verybadsoldier","id":364469,"avatar_url":"https://avatars.githubusercontent.com/u/364469?v=3","gravatar_id":"","url":"https://api.github.com/users/verybadsoldier","html_url":"https://github.com/verybadsoldier","followers_url":"https://api.github.com/users/verybadsoldier/followers","following_url":"https://api.github.com/users/verybadsoldier/following{/other_user}","gists_url":"https://api.github.com/users/verybadsoldier/gists{/gist_id}","starred_url":"https://api.github.com/users/verybadsoldier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybadsoldier/subscriptions","organizations_url":"https://api.github.com/users/verybadsoldier/orgs","repos_url":"https://api.github.com/users/verybadsoldier/repos","events_url":"https://api.github.com/users/verybadsoldier/events{/privacy}","received_events_url":"https://api.github.com/users/verybadsoldier/received_events","type":"User","site_admin":false},"body":"Makes Kodi wait for network connection after resuming from suspend.\r\n\r\n## Description\r\nThis introduces a function `WaitForNet` in Kodi's power manager which will block (with a timeout) until at least one network interface is initialized and connected. This function is invoked in `OnWake` so it is triggered on every wake up.\r\nThis behavior is disabled by default and has to be activated by a new advanced setting:\r\n```\r\n    <suspend>\r\n        <waitnetonwakeup>true</waitnetonwakeup>\r\n    </suspend>\r\n```\r\n\r\nThis new setting would have to be documented on the Wiki I guess.\r\n\r\n## Motivation and Context\r\nWhen waking the machine from sleep/suspend and directly trying to access network resources (e.g. playing a video or reading from the MySQL DB) then Kodi will fail cause the network has not been initialized yet.\r\nI have experienced and described this issue here:\r\nhttp://forum.kodi.tv/showthread.php?tid=301976\r\n\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here -->\r\n\r\n## How Has This Been Tested?\r\nI tested it on a Intel NUC i5 using LibreELEC 7.02 using a wired network. I tested it by suspending the machine and waking it up again. Then I observed the behavior with and without this setting enabled. With the setting enabled Kodi blocked for several seconds and put something like this in the logfile:\r\n\r\n```\r\n12:51:10 T:140441393608768  NOTICE: OnWake: Running resume jobs\r\n12:51:10 T:140441393608768  NOTICE: WaitForNet: Waiting for first network interface to come up\r\n12:51:18 T:140441393608768  NOTICE: WaitForNet: network interface 'eth0' is up after waiting 7400 ms\r\n12:51:18 T:140441393608768  NOTICE: OnWake: Restarting lirc\r\n```\r\n\r\nAfter this I could use Kodi and directly access network resources without issues.\r\n\r\n## Types of change\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n- [x] My code follows the [Code guidelines](https://codedocs.xyz/xbmc/xbmc/code_guidelines.html) of this project \r\n- [x] My change requires a change to the documentation, either Doxygen or wiki\r\n- [ ] I have updated the documentation accordingly\r\n- [x] I have read the [CONTRIBUTING](https://github.com/xbmc/xbmc/blob/master/CONTRIBUTING.md) document\r\n- [ ] I have added tests to cover my change\r\n- [ ] All new and existing tests passed\r\n","created_at":"2016-12-27T11:55:05Z","updated_at":"2016-12-30T09:51:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ef7281befcdbfaf6aac323cf5eb48e53a2e90e8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/xbmc/pulls/11277/commits","review_comments_url":"https://api.github.com/repos/xbmc/xbmc/pulls/11277/comments","review_comment_url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/11277/comments","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/8d4b6e5a8748ad2edd0c4f5c546319e941d418b8","head":{"label":"verybadsoldier:net_after_suspend","ref":"net_after_suspend","sha":"8d4b6e5a8748ad2edd0c4f5c546319e941d418b8","user":{"login":"verybadsoldier","id":364469,"avatar_url":"https://avatars.githubusercontent.com/u/364469?v=3","gravatar_id":"","url":"https://api.github.com/users/verybadsoldier","html_url":"https://github.com/verybadsoldier","followers_url":"https://api.github.com/users/verybadsoldier/followers","following_url":"https://api.github.com/users/verybadsoldier/following{/other_user}","gists_url":"https://api.github.com/users/verybadsoldier/gists{/gist_id}","starred_url":"https://api.github.com/users/verybadsoldier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybadsoldier/subscriptions","organizations_url":"https://api.github.com/users/verybadsoldier/orgs","repos_url":"https://api.github.com/users/verybadsoldier/repos","events_url":"https://api.github.com/users/verybadsoldier/events{/privacy}","received_events_url":"https://api.github.com/users/verybadsoldier/received_events","type":"User","site_admin":false},"repo":{"id":10200317,"name":"xbmc","full_name":"verybadsoldier/xbmc","owner":{"login":"verybadsoldier","id":364469,"avatar_url":"https://avatars.githubusercontent.com/u/364469?v=3","gravatar_id":"","url":"https://api.github.com/users/verybadsoldier","html_url":"https://github.com/verybadsoldier","followers_url":"https://api.github.com/users/verybadsoldier/followers","following_url":"https://api.github.com/users/verybadsoldier/following{/other_user}","gists_url":"https://api.github.com/users/verybadsoldier/gists{/gist_id}","starred_url":"https://api.github.com/users/verybadsoldier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybadsoldier/subscriptions","organizations_url":"https://api.github.com/users/verybadsoldier/orgs","repos_url":"https://api.github.com/users/verybadsoldier/repos","events_url":"https://api.github.com/users/verybadsoldier/events{/privacy}","received_events_url":"https://api.github.com/users/verybadsoldier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/verybadsoldier/xbmc","description":"XBMC Main Repository","fork":true,"url":"https://api.github.com/repos/verybadsoldier/xbmc","forks_url":"https://api.github.com/repos/verybadsoldier/xbmc/forks","keys_url":"https://api.github.com/repos/verybadsoldier/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verybadsoldier/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verybadsoldier/xbmc/teams","hooks_url":"https://api.github.com/repos/verybadsoldier/xbmc/hooks","issue_events_url":"https://api.github.com/repos/verybadsoldier/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/verybadsoldier/xbmc/events","assignees_url":"https://api.github.com/repos/verybadsoldier/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/verybadsoldier/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/verybadsoldier/xbmc/tags","blobs_url":"https://api.github.com/repos/verybadsoldier/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verybadsoldier/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verybadsoldier/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/verybadsoldier/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verybadsoldier/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/verybadsoldier/xbmc/languages","stargazers_url":"https://api.github.com/repos/verybadsoldier/xbmc/stargazers","contributors_url":"https://api.github.com/repos/verybadsoldier/xbmc/contributors","subscribers_url":"https://api.github.com/repos/verybadsoldier/xbmc/subscribers","subscription_url":"https://api.github.com/repos/verybadsoldier/xbmc/subscription","commits_url":"https://api.github.com/repos/verybadsoldier/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/verybadsoldier/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/verybadsoldier/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/verybadsoldier/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/verybadsoldier/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/verybadsoldier/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verybadsoldier/xbmc/merges","archive_url":"https://api.github.com/repos/verybadsoldier/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verybadsoldier/xbmc/downloads","issues_url":"https://api.github.com/repos/verybadsoldier/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/verybadsoldier/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/verybadsoldier/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/verybadsoldier/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verybadsoldier/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/verybadsoldier/xbmc/releases{/id}","deployments_url":"https://api.github.com/repos/verybadsoldier/xbmc/deployments","created_at":"2013-05-21T16:34:01Z","updated_at":"2014-06-07T05:26:37Z","pushed_at":"2016-12-28T12:36:31Z","git_url":"git://github.com/verybadsoldier/xbmc.git","ssh_url":"git@github.com:verybadsoldier/xbmc.git","clone_url":"https://github.com/verybadsoldier/xbmc.git","svn_url":"https://github.com/verybadsoldier/xbmc","homepage":"http://xbmc.org","size":567296,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xbmc:master","ref":"master","sha":"f7fe03ae38048976236cd8f2d0cda4fa3bfa284c","user":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"repo":{"id":1217614,"name":"xbmc","full_name":"xbmc/xbmc","owner":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xbmc/xbmc","description":"Kodi Main Repository - By using this code you agree with our policy and will follow the GPLv2 license as included","fork":false,"url":"https://api.github.com/repos/xbmc/xbmc","forks_url":"https://api.github.com/repos/xbmc/xbmc/forks","keys_url":"https://api.github.com/repos/xbmc/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xbmc/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xbmc/xbmc/teams","hooks_url":"https://api.github.com/repos/xbmc/xbmc/hooks","issue_events_url":"https://api.github.com/repos/xbmc/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/xbmc/xbmc/events","assignees_url":"https://api.github.com/repos/xbmc/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/xbmc/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/xbmc/xbmc/tags","blobs_url":"https://api.github.com/repos/xbmc/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xbmc/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xbmc/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xbmc/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/xbmc/xbmc/languages","stargazers_url":"https://api.github.com/repos/xbmc/xbmc/stargazers","contributors_url":"https://api.github.com/repos/xbmc/xbmc/contributors","subscribers_url":"https://api.github.com/repos/xbmc/xbmc/subscribers","subscription_url":"https://api.github.com/repos/xbmc/xbmc/subscription","commits_url":"https://api.github.com/repos/xbmc/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xbmc/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xbmc/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xbmc/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xbmc/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/xbmc/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xbmc/xbmc/merges","archive_url":"https://api.github.com/repos/xbmc/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xbmc/xbmc/downloads","issues_url":"https://api.github.com/repos/xbmc/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/xbmc/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/xbmc/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/xbmc/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xbmc/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/xbmc/xbmc/releases{/id}","deployments_url":"https://api.github.com/repos/xbmc/xbmc/deployments","created_at":"2011-01-03T21:18:51Z","updated_at":"2016-12-30T06:14:59Z","pushed_at":"2016-12-30T09:51:25Z","git_url":"git://github.com/xbmc/xbmc.git","ssh_url":"git@github.com:xbmc/xbmc.git","clone_url":"https://github.com/xbmc/xbmc.git","svn_url":"https://github.com/xbmc/xbmc","homepage":"http://kodi.wiki/view/Official:Trademark_Policy","size":1393548,"stargazers_count":5341,"watchers_count":5341,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3832,"mirror_url":null,"open_issues_count":220,"forks":3832,"open_issues":220,"watchers":5341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/11277"},"html":{"href":"https://github.com/xbmc/xbmc/pull/11277"},"issue":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/11277"},"comments":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/11277/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/11277/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/11277/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/xbmc/statuses/8d4b6e5a8748ad2edd0c4f5c546319e941d418b8"}}}}
{"actor":{"display_login":"Jalle19"}}