Commit 050053a9 authored by Marc Gravell's avatar Marc Gravell

Merge pull request #353 from rjmooney/rjmooney/issue_42

Remove indirection to mitigate a presumed deadlock. Fixes StackExchange/StackExchange.Redis#42.
parents 567cdf73 0a827974
...@@ -813,8 +813,7 @@ private static ConnectionMultiplexer ConnectImpl(Func<ConnectionMultiplexer> mul ...@@ -813,8 +813,7 @@ private static ConnectionMultiplexer ConnectImpl(Func<ConnectionMultiplexer> mul
var muxer = multiplexerFactory(); var muxer = multiplexerFactory();
killMe = muxer; killMe = muxer;
// note that task has timeouts internally, so it might take *just over* the regular timeout // note that task has timeouts internally, so it might take *just over* the regular timeout
// wrap into task to force async execution var task = muxer.ReconfigureAsync(true, false, log, null, "connect");
var task = Factory.StartNew(() => muxer.ReconfigureAsync(true, false, log, null, "connect").Result);
if (!task.Wait(muxer.SyncConnectTimeout(true))) if (!task.Wait(muxer.SyncConnectTimeout(true)))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment