@@ -432,26 +432,28 @@ protected override void Ready(object message)
432
432
foreach ( var handle in _handleTable )
433
433
{
434
434
if ( handle . Item1 == naked )
435
- handle . Item2 . Disassociate ( ) ;
436
- }
435
+ #pragma warning disable CS0618
436
+ handle . Item2 . Disassociate ( ) ;
437
+ #pragma warning restore CS0618
438
+ }
437
439
438
- /*
439
- * NOTE: Important difference between Akka.NET and Akka here.
440
- * In canonical Akka, ThrottleHandlers are never removed from
441
- * the _handleTable. The reason is because Ask-ing a terminated ActorRef
442
- * doesn't cause any exceptions to be thrown upstream - it just times out
443
- * and propagates a failed Future.
444
- *
445
- * In the CLR, a CancellationException gets thrown and causes all
446
- * parent tasks chaining back to the EndPointManager to fail due
447
- * to an Ask timeout.
448
- *
449
- * So in order to avoid this problem, we remove any disassociated handles
450
- * from the _handleTable.
451
- *
452
- * Questions? Ask @Aaronontheweb
453
- */
454
- _handleTable . RemoveAll ( tuple => tuple . Item1 == naked ) ;
440
+ /*
441
+ * NOTE: Important difference between Akka.NET and Akka here.
442
+ * In canonical Akka, ThrottleHandlers are never removed from
443
+ * the _handleTable. The reason is because Ask-ing a terminated ActorRef
444
+ * doesn't cause any exceptions to be thrown upstream - it just times out
445
+ * and propagates a failed Future.
446
+ *
447
+ * In the CLR, a CancellationException gets thrown and causes all
448
+ * parent tasks chaining back to the EndPointManager to fail due
449
+ * to an Ask timeout.
450
+ *
451
+ * So in order to avoid this problem, we remove any disassociated handles
452
+ * from the _handleTable.
453
+ *
454
+ * Questions? Ask @Aaronontheweb
455
+ */
456
+ _handleTable . RemoveAll ( tuple => tuple . Item1 == naked ) ;
455
457
Sender . Tell ( ForceDisassociateAck . Instance ) ;
456
458
return ;
457
459
}
@@ -927,7 +929,9 @@ bool TryConsume(ThrottleMode currentBucket)
927
929
}
928
930
929
931
/// <inheritdoc/>
932
+ #pragma warning disable CS0672
930
933
public override void Disassociate ( )
934
+ #pragma warning restore CS0672
931
935
{
932
936
ThrottlerActor . Tell ( PoisonPill . Instance ) ;
933
937
}
@@ -1162,7 +1166,9 @@ private void InitializeFSM()
1162
1166
if ( mode is Blackhole )
1163
1167
{
1164
1168
ThrottledMessages = new Queue < ByteString > ( ) ;
1169
+ #pragma warning disable CS0618
1165
1170
exposedHandle . Disassociate ( ) ;
1171
+ #pragma warning restore CS0618
1166
1172
return Stop ( ) ;
1167
1173
}
1168
1174
else
0 commit comments