{"action":"created","issue":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/368","labels_url":"https://api.github.com/repos/ServiceStack/Issues/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/Issues/issues/368/comments","events_url":"https://api.github.com/repos/ServiceStack/Issues/issues/368/events","html_url":"https://github.com/ServiceStack/Issues/issues/368","id":113841072,"number":368,"title":"Calls to Redis BlockingPopFromList are raising a socket exception and invoking the retry","user":{"login":"fuzzycactus","id":6003226,"avatar_url":"https://avatars.githubusercontent.com/u/6003226?v=3","gravatar_id":"","url":"https://api.github.com/users/fuzzycactus","html_url":"https://github.com/fuzzycactus","followers_url":"https://api.github.com/users/fuzzycactus/followers","following_url":"https://api.github.com/users/fuzzycactus/following{/other_user}","gists_url":"https://api.github.com/users/fuzzycactus/gists{/gist_id}","starred_url":"https://api.github.com/users/fuzzycactus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuzzycactus/subscriptions","organizations_url":"https://api.github.com/users/fuzzycactus/orgs","repos_url":"https://api.github.com/users/fuzzycactus/repos","events_url":"https://api.github.com/users/fuzzycactus/events{/privacy}","received_events_url":"https://api.github.com/users/fuzzycactus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-28T14:59:53Z","updated_at":"2015-10-28T17:54:47Z","closed_at":"2015-10-28T17:48:59Z","body":"When issuing a call to a blocking pop it does not appear to respect the timeout value passed and instead raises a socket send/receive exception that in turn invokes the retry mechanism - when the list is empty.  I created a small test app that should repro the steps - when using timeout = null the socket exception is raised immediately.\r\n\r\nI suspect it might be related to Redis clearing the list's key when empty.  The exception that is displayed is logged, but handled in the RedisClient SendReceive method.\r\n\r\n[repro test app](https://github.com/fuzzycactus/redistestapp)\r\n\r\nSample code block:\r\n```\r\n// add items to list\r\nfor (int i = 1; i <= 10; i++)\r\n{\r\n\tredis.PushItemToList(\"mylist\", \"item {0}\".Fmt(i));\r\n}\r\n\r\ndo\r\n{\r\n\tvar item = redis.BlockingPopItemFromList(\"mylist\", null);\r\n\r\n\t// log the popped item.  if BRPOP timeout is null and list empty, \r\n        // I do not expect to print anything\r\n\tLogManager.LogFactory.GetLogger(\"redistest\").InfoFormat(\"{0}\", item.IsNullOrEmpty() ? \" list empty \" : item);\r\n\r\n\tSystem.Threading.Thread.Sleep(1000);\r\n\r\n} while (DateTime.Now - startedAt < TimeSpan.FromSeconds(30));\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/comments/151931498","html_url":"https://github.com/ServiceStack/Issues/issues/368#issuecomment-151931498","issue_url":"https://api.github.com/repos/ServiceStack/Issues/issues/368","id":151931498,"user":{"login":"fuzzycactus","id":6003226,"avatar_url":"https://avatars.githubusercontent.com/u/6003226?v=3","gravatar_id":"","url":"https://api.github.com/users/fuzzycactus","html_url":"https://github.com/fuzzycactus","followers_url":"https://api.github.com/users/fuzzycactus/followers","following_url":"https://api.github.com/users/fuzzycactus/following{/other_user}","gists_url":"https://api.github.com/users/fuzzycactus/gists{/gist_id}","starred_url":"https://api.github.com/users/fuzzycactus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fuzzycactus/subscriptions","organizations_url":"https://api.github.com/users/fuzzycactus/orgs","repos_url":"https://api.github.com/users/fuzzycactus/repos","events_url":"https://api.github.com/users/fuzzycactus/events{/privacy}","received_events_url":"https://api.github.com/users/fuzzycactus/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T17:54:47Z","updated_at":"2015-10-28T17:54:47Z","body":"Answers my issue, thank you."}}