{"action":"created","issue":{"url":"https://api.github.com/repos/rvagg/node-fd/issues/1","repository_url":"https://api.github.com/repos/rvagg/node-fd","labels_url":"https://api.github.com/repos/rvagg/node-fd/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rvagg/node-fd/issues/1/comments","events_url":"https://api.github.com/repos/rvagg/node-fd/issues/1/events","html_url":"https://github.com/rvagg/node-fd/issues/1","id":303497162,"number":1,"title":"Wrong key used after opening new fd?","user":{"login":"ahwayakchih","id":39827,"avatar_url":"https://avatars0.githubusercontent.com/u/39827?v=4","gravatar_id":"","url":"https://api.github.com/users/ahwayakchih","html_url":"https://github.com/ahwayakchih","followers_url":"https://api.github.com/users/ahwayakchih/followers","following_url":"https://api.github.com/users/ahwayakchih/following{/other_user}","gists_url":"https://api.github.com/users/ahwayakchih/gists{/gist_id}","starred_url":"https://api.github.com/users/ahwayakchih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahwayakchih/subscriptions","organizations_url":"https://api.github.com/users/ahwayakchih/orgs","repos_url":"https://api.github.com/users/ahwayakchih/repos","events_url":"https://api.github.com/users/ahwayakchih/events{/privacy}","received_events_url":"https://api.github.com/users/ahwayakchih/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-08T14:25:03Z","updated_at":"2018-03-09T09:10:28Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI may be wrong here, because i was just reading the code, not tried it yet, but shouldn't https://github.com/rvagg/node-fd/blob/ee2f8851540c69deb63079e46c77f159e64c3f74/index.js#L51\r\n\r\nbe this instead:\r\n\r\n```js\r\nthis._fds[key(path, fd)] = 0\r\n```\r\nI think it does not break anything at the moment, because https://github.com/rvagg/node-fd/blob/ee2f8851540c69deb63079e46c77f159e64c3f74/index.js#L62 falls back to `0` anyway, but it probably does leak object keys, because the only place they are cleaned up is at https://github.com/rvagg/node-fd/blob/ee2f8851540c69deb63079e46c77f159e64c3f74/index.js#L17 and that one does use `key` method (which in turn generates string that differs from `fd + path`).\r\n"},"comment":{"url":"https://api.github.com/repos/rvagg/node-fd/issues/comments/371755856","html_url":"https://github.com/rvagg/node-fd/issues/1#issuecomment-371755856","issue_url":"https://api.github.com/repos/rvagg/node-fd/issues/1","id":371755856,"user":{"login":"ahwayakchih","id":39827,"avatar_url":"https://avatars0.githubusercontent.com/u/39827?v=4","gravatar_id":"","url":"https://api.github.com/users/ahwayakchih","html_url":"https://github.com/ahwayakchih","followers_url":"https://api.github.com/users/ahwayakchih/followers","following_url":"https://api.github.com/users/ahwayakchih/following{/other_user}","gists_url":"https://api.github.com/users/ahwayakchih/gists{/gist_id}","starred_url":"https://api.github.com/users/ahwayakchih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahwayakchih/subscriptions","organizations_url":"https://api.github.com/users/ahwayakchih/orgs","repos_url":"https://api.github.com/users/ahwayakchih/repos","events_url":"https://api.github.com/users/ahwayakchih/events{/privacy}","received_events_url":"https://api.github.com/users/ahwayakchih/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T09:10:28Z","updated_at":"2018-03-09T09:10:28Z","author_association":"NONE","body":"@rvagg sure, no problem: #2 "}}
{"actor":{"display_login":"ahwayakchih"}}