@@ -371,7 +371,7 @@ public void UpdateMaxFrameSize(uint maxFrameSize)
371
371
}
372
372
373
373
/// <summary>
374
- /// Call while in the <c> _writeLock</c >.
374
+ /// Call while in the <see cref=" _writeLock"/ >.
375
375
/// </summary>
376
376
/// <returns><c>true</c> if already completed.</returns>
377
377
private bool CompleteUnsynchronized ( )
@@ -397,8 +397,8 @@ public void Complete()
397
397
}
398
398
}
399
399
400
- // Ok to call after aborting the Pipe because we've already set _completed to true which means any writes from the abort call
401
- // won't call into the Pipe.
400
+ // Call outside of _writeLock as this can call Http2OutputProducer.Stop which can acquire Http2OutputProducer._dataWriterLock
401
+ // which is not the desired lock order
402
402
AbortConnectionFlowControl ( ) ;
403
403
}
404
404
@@ -426,6 +426,10 @@ public void Abort(ConnectionAbortedException error)
426
426
return ;
427
427
}
428
428
}
429
+
430
+ // Call outside of _writeLock as this can call Http2OutputProducer.Stop which can acquire Http2OutputProducer._dataWriterLock
431
+ // which is not the desired lock order
432
+ AbortConnectionFlowControl ( ) ;
429
433
}
430
434
431
435
private ValueTask < FlushResult > FlushEndOfStreamHeadersAsync ( Http2Stream stream )
@@ -946,7 +950,9 @@ private void ConsumeConnectionWindow(long bytes)
946
950
}
947
951
948
952
/// <summary>
949
- /// Do not call this method under the _writeLock
953
+ /// Do not call this method under the _writeLock.
954
+ /// This method can call Http2OutputProducer.Stop which can acquire Http2OutputProducer._dataWriterLock
955
+ /// which is not the desired lock order
950
956
/// </summary>
951
957
private void AbortConnectionFlowControl ( )
952
958
{
0 commit comments