{"action":"opened","issue":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/936","labels_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/936/labels{/name}","comments_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/936/comments","events_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/936/events","html_url":"https://github.com/NodeRedis/node_redis/issues/936","id":122838439,"number":936,"title":"BRPOP does not trigger callback on LPUSH","user":{"login":"airportyh","id":54303,"avatar_url":"https://avatars.githubusercontent.com/u/54303?v=3","gravatar_id":"","url":"https://api.github.com/users/airportyh","html_url":"https://github.com/airportyh","followers_url":"https://api.github.com/users/airportyh/followers","following_url":"https://api.github.com/users/airportyh/following{/other_user}","gists_url":"https://api.github.com/users/airportyh/gists{/gist_id}","starred_url":"https://api.github.com/users/airportyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airportyh/subscriptions","organizations_url":"https://api.github.com/users/airportyh/orgs","repos_url":"https://api.github.com/users/airportyh/repos","events_url":"https://api.github.com/users/airportyh/events{/privacy}","received_events_url":"https://api.github.com/users/airportyh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T22:38:05Z","updated_at":"2015-12-17T22:38:05Z","closed_at":null,"body":"I am coming across this bug when trying to use https://www.npmjs.com/package/simple-redis-queue. I narrowed it down to this:\r\n\r\n```\r\nvar redis = require('redis');\r\nvar client = redis.createClient();\r\n\r\nclient.brpop('list', 0, function(err, replies) {\r\n  console.log('ITEM', err, replies);\r\n});\r\n\r\nclient.lpush('list', 1);\r\n```\r\n\r\nThe callback to `brpop` will not get called if list initially contains zero items. If on the other hand, the list contains at least one item before the `brpop` call, then the callback registers.\r\n\r\n```\r\nvar redis = require('redis');\r\nvar client = redis.createClient();\r\n\r\nclient.lpush('list', 1);\r\nclient.brpop('list', 0, function(err, replies) {\r\n  console.log('ITEM', err, replies);\r\n});\r\n```"}}