{"action":"opened","number":126,"pull_request":{"url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126","id":180573537,"html_url":"https://github.com/kblok/puppeteer-sharp/pull/126","diff_url":"https://github.com/kblok/puppeteer-sharp/pull/126.diff","patch_url":"https://github.com/kblok/puppeteer-sharp/pull/126.patch","issue_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/126","number":126,"state":"open","locked":false,"title":"Fire and forget Target.closeTarget","user":{"login":"kblok","id":2198466,"avatar_url":"https://avatars0.githubusercontent.com/u/2198466?v=4","gravatar_id":"","url":"https://api.github.com/users/kblok","html_url":"https://github.com/kblok","followers_url":"https://api.github.com/users/kblok/followers","following_url":"https://api.github.com/users/kblok/following{/other_user}","gists_url":"https://api.github.com/users/kblok/gists{/gist_id}","starred_url":"https://api.github.com/users/kblok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblok/subscriptions","organizations_url":"https://api.github.com/users/kblok/orgs","repos_url":"https://api.github.com/users/kblok/repos","events_url":"https://api.github.com/users/kblok/events{/privacy}","received_events_url":"https://api.github.com/users/kblok/received_events","type":"User","site_admin":false},"body":"In some scenarios `GetAwaiter().Result` might produce some deadlocks, there are many [post about this](https://blog.stephencleary.com/2012/07/dont-block-on-async-code.html).\r\nI was never a fan of GetAwaiters because there was something in my mind saying \"hey this might break\", but we were forced to use `GetAwaiter` because we don't have a DisposableAsync.\r\n\r\nSo we fell into some deadlocks in console apps. \r\nWhen we lock the execution here:\r\nhttps://github.com/kblok/puppeteer-sharp/blob/master/lib/PuppeteerSharp/Page.cs#L783\r\n\r\nThere we are preventing the `ReceiveAsync` method from getting the result the same `CloseAsync`, through `target.closeTarget` is waiting for.\r\n\r\nhttps://github.com/kblok/puppeteer-sharp/blob/master/lib/PuppeteerSharp/Connection.cs#L134\r\n\r\nI'm fixing this by calling that close as a trigger and forget. I don't think that all `SendAsync` that are not expecting a value should be a trigger and forget call, because is good to know if the command was successfully executed. But a close is a close, we want to get out of there as soon as possible.\r\n\r\ncloses #122 \r\n","created_at":"2018-04-10T11:40:13Z","updated_at":"2018-04-10T11:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126/commits","review_comments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126/comments","review_comment_url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/126/comments","statuses_url":"https://api.github.com/repos/kblok/puppeteer-sharp/statuses/1c6a71baa5d025fafa8c3130353910e282130723","head":{"label":"kblok:fixes/issue-122","ref":"fixes/issue-122","sha":"1c6a71baa5d025fafa8c3130353910e282130723","user":{"login":"kblok","id":2198466,"avatar_url":"https://avatars0.githubusercontent.com/u/2198466?v=4","gravatar_id":"","url":"https://api.github.com/users/kblok","html_url":"https://github.com/kblok","followers_url":"https://api.github.com/users/kblok/followers","following_url":"https://api.github.com/users/kblok/following{/other_user}","gists_url":"https://api.github.com/users/kblok/gists{/gist_id}","starred_url":"https://api.github.com/users/kblok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblok/subscriptions","organizations_url":"https://api.github.com/users/kblok/orgs","repos_url":"https://api.github.com/users/kblok/repos","events_url":"https://api.github.com/users/kblok/events{/privacy}","received_events_url":"https://api.github.com/users/kblok/received_events","type":"User","site_admin":false},"repo":{"id":105399035,"name":"puppeteer-sharp","full_name":"kblok/puppeteer-sharp","owner":{"login":"kblok","id":2198466,"avatar_url":"https://avatars0.githubusercontent.com/u/2198466?v=4","gravatar_id":"","url":"https://api.github.com/users/kblok","html_url":"https://github.com/kblok","followers_url":"https://api.github.com/users/kblok/followers","following_url":"https://api.github.com/users/kblok/following{/other_user}","gists_url":"https://api.github.com/users/kblok/gists{/gist_id}","starred_url":"https://api.github.com/users/kblok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblok/subscriptions","organizations_url":"https://api.github.com/users/kblok/orgs","repos_url":"https://api.github.com/users/kblok/repos","events_url":"https://api.github.com/users/kblok/events{/privacy}","received_events_url":"https://api.github.com/users/kblok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kblok/puppeteer-sharp","description":"Headless Chrome .NET API","fork":false,"url":"https://api.github.com/repos/kblok/puppeteer-sharp","forks_url":"https://api.github.com/repos/kblok/puppeteer-sharp/forks","keys_url":"https://api.github.com/repos/kblok/puppeteer-sharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kblok/puppeteer-sharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kblok/puppeteer-sharp/teams","hooks_url":"https://api.github.com/repos/kblok/puppeteer-sharp/hooks","issue_events_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/events{/number}","events_url":"https://api.github.com/repos/kblok/puppeteer-sharp/events","assignees_url":"https://api.github.com/repos/kblok/puppeteer-sharp/assignees{/user}","branches_url":"https://api.github.com/repos/kblok/puppeteer-sharp/branches{/branch}","tags_url":"https://api.github.com/repos/kblok/puppeteer-sharp/tags","blobs_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kblok/puppeteer-sharp/statuses/{sha}","languages_url":"https://api.github.com/repos/kblok/puppeteer-sharp/languages","stargazers_url":"https://api.github.com/repos/kblok/puppeteer-sharp/stargazers","contributors_url":"https://api.github.com/repos/kblok/puppeteer-sharp/contributors","subscribers_url":"https://api.github.com/repos/kblok/puppeteer-sharp/subscribers","subscription_url":"https://api.github.com/repos/kblok/puppeteer-sharp/subscription","commits_url":"https://api.github.com/repos/kblok/puppeteer-sharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/kblok/puppeteer-sharp/contents/{+path}","compare_url":"https://api.github.com/repos/kblok/puppeteer-sharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kblok/puppeteer-sharp/merges","archive_url":"https://api.github.com/repos/kblok/puppeteer-sharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kblok/puppeteer-sharp/downloads","issues_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues{/number}","pulls_url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls{/number}","milestones_url":"https://api.github.com/repos/kblok/puppeteer-sharp/milestones{/number}","notifications_url":"https://api.github.com/repos/kblok/puppeteer-sharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kblok/puppeteer-sharp/labels{/name}","releases_url":"https://api.github.com/repos/kblok/puppeteer-sharp/releases{/id}","deployments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/deployments","created_at":"2017-09-30T20:32:25Z","updated_at":"2018-04-09T19:27:26Z","pushed_at":"2018-04-10T11:31:16Z","git_url":"git://github.com/kblok/puppeteer-sharp.git","ssh_url":"git@github.com:kblok/puppeteer-sharp.git","clone_url":"https://github.com/kblok/puppeteer-sharp.git","svn_url":"https://github.com/kblok/puppeteer-sharp","homepage":null,"size":414,"stargazers_count":56,"watchers_count":56,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":7,"open_issues":58,"watchers":56,"default_branch":"master"}},"base":{"label":"kblok:master","ref":"master","sha":"37e76f49a8bf5d4da4ab4b48720109c9b7009890","user":{"login":"kblok","id":2198466,"avatar_url":"https://avatars0.githubusercontent.com/u/2198466?v=4","gravatar_id":"","url":"https://api.github.com/users/kblok","html_url":"https://github.com/kblok","followers_url":"https://api.github.com/users/kblok/followers","following_url":"https://api.github.com/users/kblok/following{/other_user}","gists_url":"https://api.github.com/users/kblok/gists{/gist_id}","starred_url":"https://api.github.com/users/kblok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblok/subscriptions","organizations_url":"https://api.github.com/users/kblok/orgs","repos_url":"https://api.github.com/users/kblok/repos","events_url":"https://api.github.com/users/kblok/events{/privacy}","received_events_url":"https://api.github.com/users/kblok/received_events","type":"User","site_admin":false},"repo":{"id":105399035,"name":"puppeteer-sharp","full_name":"kblok/puppeteer-sharp","owner":{"login":"kblok","id":2198466,"avatar_url":"https://avatars0.githubusercontent.com/u/2198466?v=4","gravatar_id":"","url":"https://api.github.com/users/kblok","html_url":"https://github.com/kblok","followers_url":"https://api.github.com/users/kblok/followers","following_url":"https://api.github.com/users/kblok/following{/other_user}","gists_url":"https://api.github.com/users/kblok/gists{/gist_id}","starred_url":"https://api.github.com/users/kblok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kblok/subscriptions","organizations_url":"https://api.github.com/users/kblok/orgs","repos_url":"https://api.github.com/users/kblok/repos","events_url":"https://api.github.com/users/kblok/events{/privacy}","received_events_url":"https://api.github.com/users/kblok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kblok/puppeteer-sharp","description":"Headless Chrome .NET API","fork":false,"url":"https://api.github.com/repos/kblok/puppeteer-sharp","forks_url":"https://api.github.com/repos/kblok/puppeteer-sharp/forks","keys_url":"https://api.github.com/repos/kblok/puppeteer-sharp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kblok/puppeteer-sharp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kblok/puppeteer-sharp/teams","hooks_url":"https://api.github.com/repos/kblok/puppeteer-sharp/hooks","issue_events_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/events{/number}","events_url":"https://api.github.com/repos/kblok/puppeteer-sharp/events","assignees_url":"https://api.github.com/repos/kblok/puppeteer-sharp/assignees{/user}","branches_url":"https://api.github.com/repos/kblok/puppeteer-sharp/branches{/branch}","tags_url":"https://api.github.com/repos/kblok/puppeteer-sharp/tags","blobs_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/refs{/sha}","trees_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kblok/puppeteer-sharp/statuses/{sha}","languages_url":"https://api.github.com/repos/kblok/puppeteer-sharp/languages","stargazers_url":"https://api.github.com/repos/kblok/puppeteer-sharp/stargazers","contributors_url":"https://api.github.com/repos/kblok/puppeteer-sharp/contributors","subscribers_url":"https://api.github.com/repos/kblok/puppeteer-sharp/subscribers","subscription_url":"https://api.github.com/repos/kblok/puppeteer-sharp/subscription","commits_url":"https://api.github.com/repos/kblok/puppeteer-sharp/commits{/sha}","git_commits_url":"https://api.github.com/repos/kblok/puppeteer-sharp/git/commits{/sha}","comments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/comments{/number}","issue_comment_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/comments{/number}","contents_url":"https://api.github.com/repos/kblok/puppeteer-sharp/contents/{+path}","compare_url":"https://api.github.com/repos/kblok/puppeteer-sharp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kblok/puppeteer-sharp/merges","archive_url":"https://api.github.com/repos/kblok/puppeteer-sharp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kblok/puppeteer-sharp/downloads","issues_url":"https://api.github.com/repos/kblok/puppeteer-sharp/issues{/number}","pulls_url":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls{/number}","milestones_url":"https://api.github.com/repos/kblok/puppeteer-sharp/milestones{/number}","notifications_url":"https://api.github.com/repos/kblok/puppeteer-sharp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kblok/puppeteer-sharp/labels{/name}","releases_url":"https://api.github.com/repos/kblok/puppeteer-sharp/releases{/id}","deployments_url":"https://api.github.com/repos/kblok/puppeteer-sharp/deployments","created_at":"2017-09-30T20:32:25Z","updated_at":"2018-04-09T19:27:26Z","pushed_at":"2018-04-10T11:31:16Z","git_url":"git://github.com/kblok/puppeteer-sharp.git","ssh_url":"git@github.com:kblok/puppeteer-sharp.git","clone_url":"https://github.com/kblok/puppeteer-sharp.git","svn_url":"https://github.com/kblok/puppeteer-sharp","homepage":null,"size":414,"stargazers_count":56,"watchers_count":56,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":58,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":7,"open_issues":58,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126"},"html":{"href":"https://github.com/kblok/puppeteer-sharp/pull/126"},"issue":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/126"},"comments":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/kblok/puppeteer-sharp/statuses/1c6a71baa5d025fafa8c3130353910e282130723"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":10,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"kblok"}}