{"action":"created","issue":{"url":"https://api.github.com/repos/Raynos/level-livefeed/issues/2","labels_url":"https://api.github.com/repos/Raynos/level-livefeed/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Raynos/level-livefeed/issues/2/comments","events_url":"https://api.github.com/repos/Raynos/level-livefeed/issues/2/events","html_url":"https://github.com/Raynos/level-livefeed/issues/2","id":68276202,"number":2,"title":"put is fired twice with sublevel","user":{"login":"kessler","id":147367,"avatar_url":"https://avatars.githubusercontent.com/u/147367?v=3","gravatar_id":"","url":"https://api.github.com/users/kessler","html_url":"https://github.com/kessler","followers_url":"https://api.github.com/users/kessler/followers","following_url":"https://api.github.com/users/kessler/following{/other_user}","gists_url":"https://api.github.com/users/kessler/gists{/gist_id}","starred_url":"https://api.github.com/users/kessler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kessler/subscriptions","organizations_url":"https://api.github.com/users/kessler/orgs","repos_url":"https://api.github.com/users/kessler/repos","events_url":"https://api.github.com/users/kessler/events{/privacy}","received_events_url":"https://api.github.com/users/kessler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-14T06:21:10Z","updated_at":"2015-04-19T00:13:47Z","closed_at":null,"body":"Hi,\r\n\r\nThe following will cause the livefeed to fire put twice:\r\n```javascript\r\nvar level = require('levelup')\r\nvar sublevel = require('level-sublevel')\r\nvar livefeed = require('level-livefeed')\r\n\r\nvar db = level('db')\r\nvar subbable = sublevel(db)\r\n\r\nvar sub1 = subbable.sublevel('1')\r\n\r\nvar feed1 = livefeed(sub1)\r\n\r\nfeed1.on('data', function(d) {\r\n\tconsole.log('live %s', JSON.stringify(d))\r\n})\r\n\r\nsub1.put('a', 'b')\r\n```\r\nThis code will print:\r\n```\r\nlive {\"type\":\"put\",\"key\":\"a\",\"value\":\"b\"}\r\nlive {\"key\":\"a\",\"value\":\"b\",\"type\":\"put\"}\r\n```\r\n\r\nmodules used:\r\n \"level\": \"^0.18.0\",\r\n \"level-livefeed\": \"^0.2.0\",\r\n \"level-sublevel\": \"^6.4.6\",\r\n \"leveldown\": \"^0.10.4\",\r\n \"levelup\": \"^0.19.0\",\r\n\r\ncommenting https://github.com/Raynos/level-livefeed/blob/master/index.js#L16 will resolve this problem.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/Raynos/level-livefeed/issues/comments/94215469","html_url":"https://github.com/Raynos/level-livefeed/issues/2#issuecomment-94215469","issue_url":"https://api.github.com/repos/Raynos/level-livefeed/issues/2","id":94215469,"user":{"login":"dominictarr","id":259374,"avatar_url":"https://avatars.githubusercontent.com/u/259374?v=3","gravatar_id":"","url":"https://api.github.com/users/dominictarr","html_url":"https://github.com/dominictarr","followers_url":"https://api.github.com/users/dominictarr/followers","following_url":"https://api.github.com/users/dominictarr/following{/other_user}","gists_url":"https://api.github.com/users/dominictarr/gists{/gist_id}","starred_url":"https://api.github.com/users/dominictarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominictarr/subscriptions","organizations_url":"https://api.github.com/users/dominictarr/orgs","repos_url":"https://api.github.com/users/dominictarr/repos","events_url":"https://api.github.com/users/dominictarr/events{/privacy}","received_events_url":"https://api.github.com/users/dominictarr/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T00:13:47Z","updated_at":"2015-04-19T00:13:47Z","body":"try `level-live-stream` instead of `level-livefeed` pretty sure that I handle this race condition..."}}