akkadotnet/akka.net — pull request #514 by HCanber (2014-11-26 08:41:30+00:00)
Title: UnwatchWatchedActors should check _watching and not _watchedBy

This bug caused DeadLetters to be sent in this case:
A watches B
A terminates, and replaces its mailbox with Deadletters
After a while B terminates, so it sends DeathWatchNotification to A which is forwarded to DeadLetters

This fixes it to work like this:
A watches B
A terminates, Sends Unwatch to B and A replaces its mailbox with Deadletters
B Receives Unwatch and removes A from the list of watchers
After a while B terminates. No message sent to A

Also replaced a call to Any() with using Count instead.