{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/86366784","pull_request_review_id":7028940,"id":86366784,"diff_hunk":"@@ -0,0 +1,56 @@\n+'use strict';\n+require('../common');\n+const http = require('http');\n+const assert = require('assert');\n+\n+const agent = new http.Agent({ keepAlive: true });\n+\n+const server = http.createServer((req, res) => {\n+  res.end('');\n+});\n+\n+const options = {\n+  agent,\n+  method: 'GET',\n+  port: undefined,\n+  host: '127.0.0.1',\n+  path: '/',\n+  timeout: 10\n+};\n+\n+server.listen(0, options.host, (e) => {\n+  options.port = server.address().port;\n+\n+  doRequest().then(doRequest)\n+    .then((numListeners) => {\n+      assert.strictEqual(numListeners, 1,\n+                         'Should be a single timeout listener on the socket');\n+      server.close();\n+      agent.destroy();\n+    })\n+    .catch((e) => {\n+      console.log(e);","path":"test/parallel/test-http-client-timeout-option-listeners.js","position":32,"original_position":32,"commit_id":"65790af582998c9c3b820a2dee84da5634455343","original_commit_id":"65790af582998c9c3b820a2dee84da5634455343","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"body":"Unless the `console.log()` is part of the test, I'd prefer to omit the extraneous output","created_at":"2016-11-03T15:14:42Z","updated_at":"2016-11-03T15:14:42Z","html_url":"https://github.com/nodejs/node/pull/9440#discussion_r86366784","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/9440","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/86366784"},"html":{"href":"https://github.com/nodejs/node/pull/9440#discussion_r86366784"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/9440"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/9440","id":92137265,"html_url":"https://github.com/nodejs/node/pull/9440","diff_url":"https://github.com/nodejs/node/pull/9440.diff","patch_url":"https://github.com/nodejs/node/pull/9440.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/9440","number":9440,"state":"open","locked":false,"title":"http: remove stale timeout listeners","user":{"login":"karlbohlmark","id":68194,"avatar_url":"https://avatars.githubusercontent.com/u/68194?v=3","gravatar_id":"","url":"https://api.github.com/users/karlbohlmark","html_url":"https://github.com/karlbohlmark","followers_url":"https://api.github.com/users/karlbohlmark/followers","following_url":"https://api.github.com/users/karlbohlmark/following{/other_user}","gists_url":"https://api.github.com/users/karlbohlmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karlbohlmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlbohlmark/subscriptions","organizations_url":"https://api.github.com/users/karlbohlmark/orgs","repos_url":"https://api.github.com/users/karlbohlmark/repos","events_url":"https://api.github.com/users/karlbohlmark/events{/privacy}","received_events_url":"https://api.github.com/users/karlbohlmark/received_events","type":"User","site_admin":false},"body":"##### Checklist\r\n- [x] `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\nhttp\r\n\r\n##### Description of change\r\nIn order to prevent a memory leak when using keep alive, ensure that the\r\ntimeout listener for the request is removed when the response has ended.\r\n\r\nThis fixes https://github.com/nodejs/node/issues/9268","created_at":"2016-11-03T11:45:10Z","updated_at":"2016-11-03T15:14:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b950c6b8d885d708a044d90709191706e56e748","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/9440/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/9440/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/9440/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/65790af582998c9c3b820a2dee84da5634455343","head":{"label":"karlbohlmark:memory-leak-9268","ref":"memory-leak-9268","sha":"65790af582998c9c3b820a2dee84da5634455343","user":{"login":"karlbohlmark","id":68194,"avatar_url":"https://avatars.githubusercontent.com/u/68194?v=3","gravatar_id":"","url":"https://api.github.com/users/karlbohlmark","html_url":"https://github.com/karlbohlmark","followers_url":"https://api.github.com/users/karlbohlmark/followers","following_url":"https://api.github.com/users/karlbohlmark/following{/other_user}","gists_url":"https://api.github.com/users/karlbohlmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karlbohlmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlbohlmark/subscriptions","organizations_url":"https://api.github.com/users/karlbohlmark/orgs","repos_url":"https://api.github.com/users/karlbohlmark/repos","events_url":"https://api.github.com/users/karlbohlmark/events{/privacy}","received_events_url":"https://api.github.com/users/karlbohlmark/received_events","type":"User","site_admin":false},"repo":{"id":72552042,"name":"node-1","full_name":"karlbohlmark/node-1","owner":{"login":"karlbohlmark","id":68194,"avatar_url":"https://avatars.githubusercontent.com/u/68194?v=3","gravatar_id":"","url":"https://api.github.com/users/karlbohlmark","html_url":"https://github.com/karlbohlmark","followers_url":"https://api.github.com/users/karlbohlmark/followers","following_url":"https://api.github.com/users/karlbohlmark/following{/other_user}","gists_url":"https://api.github.com/users/karlbohlmark/gists{/gist_id}","starred_url":"https://api.github.com/users/karlbohlmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlbohlmark/subscriptions","organizations_url":"https://api.github.com/users/karlbohlmark/orgs","repos_url":"https://api.github.com/users/karlbohlmark/repos","events_url":"https://api.github.com/users/karlbohlmark/events{/privacy}","received_events_url":"https://api.github.com/users/karlbohlmark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karlbohlmark/node-1","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/karlbohlmark/node-1","forks_url":"https://api.github.com/repos/karlbohlmark/node-1/forks","keys_url":"https://api.github.com/repos/karlbohlmark/node-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karlbohlmark/node-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karlbohlmark/node-1/teams","hooks_url":"https://api.github.com/repos/karlbohlmark/node-1/hooks","issue_events_url":"https://api.github.com/repos/karlbohlmark/node-1/issues/events{/number}","events_url":"https://api.github.com/repos/karlbohlmark/node-1/events","assignees_url":"https://api.github.com/repos/karlbohlmark/node-1/assignees{/user}","branches_url":"https://api.github.com/repos/karlbohlmark/node-1/branches{/branch}","tags_url":"https://api.github.com/repos/karlbohlmark/node-1/tags","blobs_url":"https://api.github.com/repos/karlbohlmark/node-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karlbohlmark/node-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karlbohlmark/node-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/karlbohlmark/node-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karlbohlmark/node-1/statuses/{sha}","languages_url":"https://api.github.com/repos/karlbohlmark/node-1/languages","stargazers_url":"https://api.github.com/repos/karlbohlmark/node-1/stargazers","contributors_url":"https://api.github.com/repos/karlbohlmark/node-1/contributors","subscribers_url":"https://api.github.com/repos/karlbohlmark/node-1/subscribers","subscription_url":"https://api.github.com/repos/karlbohlmark/node-1/subscription","commits_url":"https://api.github.com/repos/karlbohlmark/node-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/karlbohlmark/node-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/karlbohlmark/node-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/karlbohlmark/node-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/karlbohlmark/node-1/contents/{+path}","compare_url":"https://api.github.com/repos/karlbohlmark/node-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karlbohlmark/node-1/merges","archive_url":"https://api.github.com/repos/karlbohlmark/node-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karlbohlmark/node-1/downloads","issues_url":"https://api.github.com/repos/karlbohlmark/node-1/issues{/number}","pulls_url":"https://api.github.com/repos/karlbohlmark/node-1/pulls{/number}","milestones_url":"https://api.github.com/repos/karlbohlmark/node-1/milestones{/number}","notifications_url":"https://api.github.com/repos/karlbohlmark/node-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karlbohlmark/node-1/labels{/name}","releases_url":"https://api.github.com/repos/karlbohlmark/node-1/releases{/id}","deployments_url":"https://api.github.com/repos/karlbohlmark/node-1/deployments","created_at":"2016-11-01T15:57:05Z","updated_at":"2016-11-01T15:57:29Z","pushed_at":"2016-11-03T11:41:42Z","git_url":"git://github.com/karlbohlmark/node-1.git","ssh_url":"git@github.com:karlbohlmark/node-1.git","clone_url":"https://github.com/karlbohlmark/node-1.git","svn_url":"https://github.com/karlbohlmark/node-1","homepage":"https://nodejs.org","size":243101,"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":"3c1e5b366f92a51824c5ae0b6f20cd290cf54a0e","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-11-03T14:59:54Z","pushed_at":"2016-11-03T14:41:02Z","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":358615,"stargazers_count":28573,"watchers_count":28573,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4756,"mirror_url":null,"open_issues_count":872,"forks":4756,"open_issues":872,"watchers":28573,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/9440"},"html":{"href":"https://github.com/nodejs/node/pull/9440"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/9440"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/9440/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/9440/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/9440/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/65790af582998c9c3b820a2dee84da5634455343"}}}}
{"actor":{"display_login":"jasnell"}}