Sentinel: fix repeat connects by NickCraver · Pull Request #2242 · StackExchange/StackExchange.Redis (original) (raw)

@NickCraver

Fixes #2233.

There were 2 issues here contributing:

  1. 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.
  2. 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.

@NickCraver

There were 2 issues here contributing:

  1. 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.
  2. 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.

@NickCraver

mgravell

philon-msft