This repository was archived by the owner on Dec 18, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/Microsoft.AspNet.Server.Kestrel/Http Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public SocketInput(MemoryPool2 memory, IThreadPool threadPool)
36
36
37
37
public bool RemoteIntakeFin { get ; set ; }
38
38
39
- public bool IsCompleted => ( _awaitableState == _awaitableIsCompleted ) ;
39
+ public bool IsCompleted => ReferenceEquals ( _awaitableState , _awaitableIsCompleted ) ;
40
40
41
41
public MemoryPoolBlock2 IncomingStart ( )
42
42
{
@@ -124,8 +124,8 @@ private void Complete()
124
124
125
125
_manualResetEvent . Set ( ) ;
126
126
127
- if ( awaitableState != _awaitableIsCompleted &&
128
- awaitableState != _awaitableIsNotCompleted )
127
+ if ( ! ReferenceEquals ( awaitableState , _awaitableIsCompleted ) &&
128
+ ! ReferenceEquals ( awaitableState , _awaitableIsNotCompleted ) )
129
129
{
130
130
_threadPool . Run ( awaitableState ) ;
131
131
}
@@ -201,11 +201,11 @@ public void OnCompleted(Action continuation)
201
201
continuation ,
202
202
_awaitableIsNotCompleted ) ;
203
203
204
- if ( awaitableState == _awaitableIsNotCompleted )
204
+ if ( ReferenceEquals ( awaitableState , _awaitableIsNotCompleted ) )
205
205
{
206
206
return ;
207
207
}
208
- else if ( awaitableState == _awaitableIsCompleted )
208
+ else if ( ReferenceEquals ( awaitableState , _awaitableIsCompleted ) )
209
209
{
210
210
_threadPool . Run ( continuation ) ;
211
211
}
You can’t perform that action at this time.
0 commit comments