Commit 5a36dc7a authored by Nick Craver's avatar Nick Craver

Fix naming of _activeMessage

Tidying this up so the diff/fix in #1374 is easier to analyze.
parent 08bc1fb6
......@@ -638,12 +638,12 @@ internal bool TryEnqueue(List<Message> messages, bool isSlave)
private readonly MutexSlim _singleWriterMutex;
private Message _activeMesssage;
private Message _activeMessage;
private WriteResult WriteMessageInsideLock(PhysicalConnection physical, Message message)
{
WriteResult result;
var existingMessage = Interlocked.CompareExchange(ref _activeMesssage, message, null);
var existingMessage = Interlocked.CompareExchange(ref _activeMessage, message, null);
if (existingMessage != null)
{
Multiplexer?.OnInfoMessage($"reentrant call to WriteMessageTakingWriteLock for {message.CommandAndKey}, {existingMessage.CommandAndKey} is still active");
......@@ -1072,7 +1072,7 @@ private WriteResult HandleWriteException(Message message, Exception ex)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void UnmarkActiveMessage(Message message)
=> Interlocked.CompareExchange(ref _activeMesssage, null, message); // remove if it is us
=> Interlocked.CompareExchange(ref _activeMessage, null, message); // remove if it is us
private State ChangeState(State newState)
{
......@@ -1301,6 +1301,6 @@ internal void SimulateConnectionFailure()
physical?.RecordConnectionFailed(ConnectionFailureType.SocketFailure);
}
internal RedisCommand? GetActiveMessage() => Volatile.Read(ref _activeMesssage)?.Command;
internal RedisCommand? GetActiveMessage() => Volatile.Read(ref _activeMessage)?.Command;
}
}
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