-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Hi
I got an ArgumentOutOfRangeException exception when calling ToString() for the ConnectionMultiplexer log. From the code it looks like all writes to the TextWriter object are synchronized inside the StackExchange.Redis code so the only thing that comes into my mind is that writes might continue after Connect() method returns and then ToString() method collides with those writes. Does it sound plausible?
FWIW we are using v1.2.6.
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: chunkLength
at System.Text.StringBuilder.ToString()
at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
...
Here is our code:
var log = new StringWriter();
ConnectionMultiplexer mux = ConnectionMultiplexer.Connect(configurationOptions, log);
Trace($"ConnectionMultiplexerCreated: id={m_id}, log={log}");
Thanks,
Pavel