Add support for duplicate shard states in BaseShardManager

This fixes an issue where a connection is not registered if it has multiple ShardState entries.
can you add a TODO comment?


On Wed, Sep 3, 2014 at 6:21 PM, Alex Degtiar <notifications@github.com>
wrote:

> In memcache/base_shard_manager.go:
>
> > @@ -63,7 +63,8 @@ func (m *BaseShardManager) UpdateShardStates(shardStates []ShardState) {
> >  	}
> >
> >  	for address, state := range diffs {
> > -		if state == 1 { // New connections
> > +		if state > 0 { // New connections
>
> Register() is a noop if the address already exists, so this isn't a
> problem. I agree that it's cleaner to do a state diff (e.g. with sets) in
> case the pool implementation changes. I'll clean this up when I get a
> chance.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dropbox/godropbox/pull/75/files#r17091192>.
>