Skip to content

Commit

Permalink
Merge pull request #394 from jthelin/code-cleanup-391-pt2
Browse files Browse the repository at this point in the history
Use .Equals() rather than == for comparing GrainId's
  • Loading branch information
jthelin committed May 6, 2015
2 parents 808a8ff + 07d5bac commit 9f5cf44
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/OrleansRuntime/Messaging/MessageCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ MIT License
*/

using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;

Expand All @@ -38,11 +37,11 @@ internal class MessageCenter : ISiloMessageCenter, IDisposable
private static readonly TraceLogger log = TraceLogger.GetLogger("Orleans.Messaging.MessageCenter");
private Action<Message> rerouteHandler;

// ReSharper disable UnaccessedField.Local
// ReSharper disable NotAccessedField.Local
private IntValueStatistic sendQueueLengthCounter;
private IntValueStatistic receiveQueueLengthCounter;
// ReSharper restore UnaccessedField.Local
// ReSharper restore NotAccessedField.Local

internal IOutboundMessageQueue OutboundQueue { get; set; }
internal IInboundMessageQueue InboundQueue { get; set; }
internal SocketManager SocketManager;
Expand Down Expand Up @@ -186,7 +185,7 @@ public void SendMessage(Message msg)
{
// Note that if we identify or add other grains that are required for proper stopping, we will need to treat them as we do the membership table grain here.
if (IsBlockingApplicationMessages && (msg.Category == Message.Categories.Application) && (msg.Result != Message.ResponseTypes.Rejection)
&& (msg.TargetGrain != Constants.SystemMembershipTableId))
&& !Constants.SystemMembershipTableId.Equals(msg.TargetGrain))
{
// Drop the message on the floor if it's an application message that isn't a rejection
}
Expand Down

0 comments on commit 9f5cf44

Please sign in to comment.