{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/2955","labels_url":"https://api.github.com/repos/nodejs/node/issues/2955/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/2955/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/2955/events","html_url":"https://github.com/nodejs/node/pull/2955","id":107266783,"number":2955,"title":"fs: don't fail with EBADF on double close","user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-18T19:52:53Z","updated_at":"2015-09-20T09:35:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/2955","html_url":"https://github.com/nodejs/node/pull/2955","diff_url":"https://github.com/nodejs/node/pull/2955.diff","patch_url":"https://github.com/nodejs/node/pull/2955.patch"},"body":"Calling fs.ReadStream#close() or fs.WriteStream#close() twice made it\r\ntry to close the file descriptor twice, with the second attempt using\r\nthe nulled out `.fd` property and failing with an EBADF error.\r\n\r\nFixes: https://github.com/nodejs/node/issues/2950\r\n\r\nCI: https://ci.nodejs.org/job/node-test-pull-request/342/"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/141764315","html_url":"https://github.com/nodejs/node/pull/2955#issuecomment-141764315","issue_url":"https://api.github.com/repos/nodejs/node/issues/2955","id":141764315,"user":{"login":"bnoordhuis","id":275871,"avatar_url":"https://avatars.githubusercontent.com/u/275871?v=3","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T09:35:55Z","updated_at":"2015-09-20T09:35:55Z","body":"Virtual shrug.  I didn't write that code and I'm not really inclined to change it for risk of breaking something.  I could change the guard to `if (fd === undefined && self.fd === null) return`."}}