Sentinel: fix repeat connects by NickCraver · Pull Request #2242 · StackExchange/StackExchange.Redis (original) (raw)
Fixes #2233.
There were 2 issues here contributing:
- Sentinel was modifying the config options, which we no longer clone. Now, we clone the endpoints and pass them down as explicit overrides into the child connection.
- EndpointCollection...wasn't actually cloning. I can't believe this didn't show up elsewhere. Collection takes a ref directly without copy of members when forming, so even if ew did clone...we'd be modifying the same thing.
There were 2 issues here contributing:
- Sentinel was modifying the config options, which we no longer clone. Now, we clone the endpoints and pass them down as explicit overrides into the child connection.
- EndpointCollection...wasn't actually cloning. I can't believe this didn't show up elsewhere. Collection takes a ref directly without copy of members when forming, so even if ew did clone...we'd be modifying the same thing.