Skip to content

Commit

Permalink
Fix occasional NRE during silo shutdown (#3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond authored and sergeybykov committed Aug 21, 2017
1 parent fd98525 commit 016815a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs
Expand Up @@ -321,7 +321,7 @@ private void ProcessAccept(SocketAsyncEventArgs e, bool completedSynchronously)

// First check to see if we're shutting down, in which case there's no point in doing anything other
// than closing the accepting socket and returning.
if (ima.Cts.IsCancellationRequested)
if (ima.Cts == null || ima.Cts.IsCancellationRequested)
{
SocketManager.CloseSocket(ima.AcceptingSocket);
ima.Log.Info(ErrorCode.Messaging_IMA_ClosingSocket, "Closing accepting socket during shutdown");
Expand Down

0 comments on commit 016815a

Please sign in to comment.