gregoriusxu / booksleeve

Automatically exported from code.google.com/p/booksleeve
Other
0 stars 0 forks source link

Subscribing to multiple channels at once will cause an Exception #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Subscribe with more than one channel as the first argument
2. Redis will reply with one message per requested channel

What is the expected output? What do you see instead?

The second reply from Redis will cause the exception 'Data received with no 
matching message' since Booksleeve only expects a single reply for the 
subscribe message.

In addition, the task returned by Subscribe() should only be finished after 
Booksleeve received a reply for all the initially requested channels.

What version of the product are you using? On what operating system?
1.3.9

Original issue reported on code.google.com by sebastia...@gmail.com on 24 Mar 2013 at 8:29

GoogleCodeExporter commented 8 years ago
I am currently using this work-around:

            Task lastSubscription = null;
            foreach (var channel in channels)
            {
                lastSubscription = _subscriber.Subscribe(channel);
            }
            lastSubscription.ContinueWith(t => OnConnectionEstablished());

Original comment by sebastia...@gmail.com on 24 Mar 2013 at 8:59

GoogleCodeExporter commented 8 years ago
Fixed in pending version, thanks.

Original comment by marc.gravell on 3 Apr 2013 at 7:58