Skip to content

Commit d89096f

Browse files
Unit-0: Fixed bug with CounterActor (#352)
need to use the `FetchCounts.Subscriber` property, rather than `Context.Sender`
1 parent 395abea commit d89096f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unit-0/completed/AkkaWordCounter/CounterActor.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ protected override void OnReceive(object message){
4444
_subscribers.Clear();
4545
break;
4646
}
47-
case FetchCounts when _doneCounting:
47+
case FetchCounts fetchCounts when _doneCounting:
48+
{
4849
// instantly reply with the results
49-
Sender.Tell(_tokenCounts.ToImmutableDictionary());
50+
fetchCounts.Subscriber.Tell(_tokenCounts.ToImmutableDictionary());
5051
break;
52+
}
5153
case FetchCounts fetch:
5254
{
5355
_subscribers.Add(fetch.Subscriber);

0 commit comments

Comments
 (0)