File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -253,12 +253,12 @@ public virtual async Task DisposeAsync()
253253 // If they're active, they'll take care of themselves when they finish since we signaled disposal.
254254 lock ( this . syncObject )
255255 {
256- if ( ! this . state . HasFlag ( MessageHandlerState . Reading ) )
256+ if ( ( this . state & MessageHandlerState . Reading ) != MessageHandlerState . Reading )
257257 {
258258 this . readingCompleted . Set ( ) ;
259259 }
260260
261- if ( ! this . state . HasFlag ( MessageHandlerState . Writing ) )
261+ if ( ( this . state & MessageHandlerState . Writing ) != MessageHandlerState . Writing )
262262 {
263263 this . writingCompleted . Set ( ) ;
264264 }
@@ -347,7 +347,7 @@ private void SetState(MessageHandlerState startingOperation)
347347 {
348348 Verify . NotDisposed ( this ) ;
349349 MessageHandlerState state = this . state ;
350- Assumes . False ( state . HasFlag ( startingOperation ) ) ;
350+ Assumes . False ( ( state & startingOperation ) == startingOperation ) ;
351351 this . state |= startingOperation ;
352352 }
353353 }
You can’t perform that action at this time.
0 commit comments