{"action":"opened","issue":{"url":"https://api.github.com/repos/luin/ioredis/issues/516","repository_url":"https://api.github.com/repos/luin/ioredis","labels_url":"https://api.github.com/repos/luin/ioredis/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/luin/ioredis/issues/516/comments","events_url":"https://api.github.com/repos/luin/ioredis/issues/516/events","html_url":"https://github.com/luin/ioredis/issues/516","id":256248562,"number":516,"title":"canceling BRPOP gracefully","user":{"login":"kabalage","id":7619177,"avatar_url":"https://avatars3.githubusercontent.com/u/7619177?v=4","gravatar_id":"","url":"https://api.github.com/users/kabalage","html_url":"https://github.com/kabalage","followers_url":"https://api.github.com/users/kabalage/followers","following_url":"https://api.github.com/users/kabalage/following{/other_user}","gists_url":"https://api.github.com/users/kabalage/gists{/gist_id}","starred_url":"https://api.github.com/users/kabalage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kabalage/subscriptions","organizations_url":"https://api.github.com/users/kabalage/orgs","repos_url":"https://api.github.com/users/kabalage/repos","events_url":"https://api.github.com/users/kabalage/events{/privacy}","received_events_url":"https://api.github.com/users/kabalage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-08T13:07:52Z","updated_at":"2017-09-08T13:07:52Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI use redis as a lightweight message queue with `BRPOP`. I would like to disconnect redis on SIGTERM, so I call `client.quit()` on the client that is listening for the messages with `BRPOP`. The problem is that the promise returned by `client.quit()` is never resolved. `client.disconnect()` works but I would not like to lose a payload that's on it's way to the client.\r\n\r\nIs this behaviour intentional? My guess is that `QUIT` waits for `BRPOP` to complete but is there a way to end a `BRPOP` safely?\r\n\r\nI would not like to use timeout and periodically resending `BRPOP` just to handle process shutdowns gracefully.\r\n\r\nThanks for the help!"}}
{"actor":{"display_login":"kabalage"}}