{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/80829632","pull_request_review_id":1856310,"id":80829632,"diff_hunk":"@@ -426,7 +426,11 @@ TLSSocket.prototype._init = function(socket, wrap) {\n \n     // Destroy socket if error happened before handshake's finish\n     if (!self._secureEstablished) {\n-      self.destroy(self._tlsError(err));\n+      if (!self._controlReleased) {\n+        self.destroy(err);\n+      } else {\n+        self.destroy(self._tlsError(err));\n+      }","path":"lib/_tls_wrap.js","position":9,"original_position":9,"commit_id":"c1bffcfd72598ee866848d9d7d220e0bb31b9538","original_commit_id":"c1bffcfd72598ee866848d9d7d220e0bb31b9538","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"body":"Furthermore, `_tlsError` returns `null` if `self._controlReleased === false`. I don't see how this particular change makes it behave differently.","created_at":"2016-09-28T01:33:50Z","updated_at":"2016-09-28T01:33:59Z","html_url":"https://github.com/nodejs/node/pull/8805#discussion_r80829632","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/8805","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/80829632"},"html":{"href":"https://github.com/nodejs/node/pull/8805#discussion_r80829632"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/8805"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/8805","id":86898204,"html_url":"https://github.com/nodejs/node/pull/8805","diff_url":"https://github.com/nodejs/node/pull/8805.diff","patch_url":"https://github.com/nodejs/node/pull/8805.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/8805","number":8805,"state":"open","locked":false,"title":"TLS/SSL: tls.TLSSocket emits error event on handshake failure","user":{"login":"lekoder","id":1224527,"avatar_url":"https://avatars.githubusercontent.com/u/1224527?v=3","gravatar_id":"","url":"https://api.github.com/users/lekoder","html_url":"https://github.com/lekoder","followers_url":"https://api.github.com/users/lekoder/followers","following_url":"https://api.github.com/users/lekoder/following{/other_user}","gists_url":"https://api.github.com/users/lekoder/gists{/gist_id}","starred_url":"https://api.github.com/users/lekoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lekoder/subscriptions","organizations_url":"https://api.github.com/users/lekoder/orgs","repos_url":"https://api.github.com/users/lekoder/repos","events_url":"https://api.github.com/users/lekoder/events{/privacy}","received_events_url":"https://api.github.com/users/lekoder/received_events","type":"User","site_admin":false},"body":"##### Checklist\r\n- [ ] `make -j8 test` (UNIX), or `vcbuild test nosign` (Windows) passes *\r\n- [x] tests and/or benchmarks are included\r\n- [x] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n`tls/ssl`\r\n\r\n##### Description of change\r\n`tls.TLSSocket` emits now `error` event on handshake failure.\r\n\r\nFixes https://github.com/nodejs/node/issues/8803\r\n\r\n##### Notes\r\n* `upstream/origin` does not pass `make -j8 test` on time of this contribution - with unrelated errors. Tests related to `tls/ssl` and new test to highlight referenced issue pass.","created_at":"2016-09-27T10:01:40Z","updated_at":"2016-09-28T01:33:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5e9aea3f50ffc1f8da812308797f12e2d27a93d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/8805/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/8805/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/8805/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/c1bffcfd72598ee866848d9d7d220e0bb31b9538","head":{"label":"lekoder:tls-socket-emit-clienterror","ref":"tls-socket-emit-clienterror","sha":"c1bffcfd72598ee866848d9d7d220e0bb31b9538","user":{"login":"lekoder","id":1224527,"avatar_url":"https://avatars.githubusercontent.com/u/1224527?v=3","gravatar_id":"","url":"https://api.github.com/users/lekoder","html_url":"https://github.com/lekoder","followers_url":"https://api.github.com/users/lekoder/followers","following_url":"https://api.github.com/users/lekoder/following{/other_user}","gists_url":"https://api.github.com/users/lekoder/gists{/gist_id}","starred_url":"https://api.github.com/users/lekoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lekoder/subscriptions","organizations_url":"https://api.github.com/users/lekoder/orgs","repos_url":"https://api.github.com/users/lekoder/repos","events_url":"https://api.github.com/users/lekoder/events{/privacy}","received_events_url":"https://api.github.com/users/lekoder/received_events","type":"User","site_admin":false},"repo":{"id":69321908,"name":"node","full_name":"lekoder/node","owner":{"login":"lekoder","id":1224527,"avatar_url":"https://avatars.githubusercontent.com/u/1224527?v=3","gravatar_id":"","url":"https://api.github.com/users/lekoder","html_url":"https://github.com/lekoder","followers_url":"https://api.github.com/users/lekoder/followers","following_url":"https://api.github.com/users/lekoder/following{/other_user}","gists_url":"https://api.github.com/users/lekoder/gists{/gist_id}","starred_url":"https://api.github.com/users/lekoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lekoder/subscriptions","organizations_url":"https://api.github.com/users/lekoder/orgs","repos_url":"https://api.github.com/users/lekoder/repos","events_url":"https://api.github.com/users/lekoder/events{/privacy}","received_events_url":"https://api.github.com/users/lekoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lekoder/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/lekoder/node","forks_url":"https://api.github.com/repos/lekoder/node/forks","keys_url":"https://api.github.com/repos/lekoder/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lekoder/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lekoder/node/teams","hooks_url":"https://api.github.com/repos/lekoder/node/hooks","issue_events_url":"https://api.github.com/repos/lekoder/node/issues/events{/number}","events_url":"https://api.github.com/repos/lekoder/node/events","assignees_url":"https://api.github.com/repos/lekoder/node/assignees{/user}","branches_url":"https://api.github.com/repos/lekoder/node/branches{/branch}","tags_url":"https://api.github.com/repos/lekoder/node/tags","blobs_url":"https://api.github.com/repos/lekoder/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lekoder/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lekoder/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/lekoder/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lekoder/node/statuses/{sha}","languages_url":"https://api.github.com/repos/lekoder/node/languages","stargazers_url":"https://api.github.com/repos/lekoder/node/stargazers","contributors_url":"https://api.github.com/repos/lekoder/node/contributors","subscribers_url":"https://api.github.com/repos/lekoder/node/subscribers","subscription_url":"https://api.github.com/repos/lekoder/node/subscription","commits_url":"https://api.github.com/repos/lekoder/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/lekoder/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/lekoder/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/lekoder/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/lekoder/node/contents/{+path}","compare_url":"https://api.github.com/repos/lekoder/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lekoder/node/merges","archive_url":"https://api.github.com/repos/lekoder/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lekoder/node/downloads","issues_url":"https://api.github.com/repos/lekoder/node/issues{/number}","pulls_url":"https://api.github.com/repos/lekoder/node/pulls{/number}","milestones_url":"https://api.github.com/repos/lekoder/node/milestones{/number}","notifications_url":"https://api.github.com/repos/lekoder/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lekoder/node/labels{/name}","releases_url":"https://api.github.com/repos/lekoder/node/releases{/id}","deployments_url":"https://api.github.com/repos/lekoder/node/deployments","created_at":"2016-09-27T05:18:53Z","updated_at":"2016-09-27T05:19:14Z","pushed_at":"2016-09-27T09:33:26Z","git_url":"git://github.com/lekoder/node.git","ssh_url":"git@github.com:lekoder/node.git","clone_url":"https://github.com/lekoder/node.git","svn_url":"https://github.com/lekoder/node","homepage":"https://nodejs.org","size":231707,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"52b6cfb6eb98ddb216c375074bf517ce581e8f0f","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-09-28T00:23:59Z","pushed_at":"2016-09-28T01:19:27Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":305252,"stargazers_count":27119,"watchers_count":27119,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4394,"mirror_url":null,"open_issues_count":812,"forks":4394,"open_issues":812,"watchers":27119,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/8805"},"html":{"href":"https://github.com/nodejs/node/pull/8805"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/8805"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/8805/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/8805/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/8805/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/c1bffcfd72598ee866848d9d7d220e0bb31b9538"}}}}
{"actor":{"display_login":"indutny"}}