Use object.ReferenceEquals when comparing Actions in SocketInput
This commit is contained in:
parent
2ce28d8f13
commit
849ff2016c
|
|
@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
|
|
||||||
public bool RemoteIntakeFin { get; set; }
|
public bool RemoteIntakeFin { get; set; }
|
||||||
|
|
||||||
public bool IsCompleted => (_awaitableState == _awaitableIsCompleted);
|
public bool IsCompleted => ReferenceEquals(_awaitableState, _awaitableIsCompleted);
|
||||||
|
|
||||||
public MemoryPoolBlock2 IncomingStart()
|
public MemoryPoolBlock2 IncomingStart()
|
||||||
{
|
{
|
||||||
|
|
@ -124,8 +124,8 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
|
|
||||||
_manualResetEvent.Set();
|
_manualResetEvent.Set();
|
||||||
|
|
||||||
if (awaitableState != _awaitableIsCompleted &&
|
if (!ReferenceEquals(awaitableState, _awaitableIsCompleted) &&
|
||||||
awaitableState != _awaitableIsNotCompleted)
|
!ReferenceEquals(awaitableState, _awaitableIsNotCompleted))
|
||||||
{
|
{
|
||||||
_threadPool.Run(awaitableState);
|
_threadPool.Run(awaitableState);
|
||||||
}
|
}
|
||||||
|
|
@ -201,11 +201,11 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
continuation,
|
continuation,
|
||||||
_awaitableIsNotCompleted);
|
_awaitableIsNotCompleted);
|
||||||
|
|
||||||
if (awaitableState == _awaitableIsNotCompleted)
|
if (ReferenceEquals(awaitableState, _awaitableIsNotCompleted))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (awaitableState == _awaitableIsCompleted)
|
else if (ReferenceEquals(awaitableState, _awaitableIsCompleted))
|
||||||
{
|
{
|
||||||
_threadPool.Run(continuation);
|
_threadPool.Run(continuation);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue