akka/akka — pull request #1866 by patriknw (2013-12-06 12:02:45+00:00)
Title: =rem #3726 Fix race in RemoteWatcher for first quick watch/unwatch

* The problem scenario was that a remote watch followed by re-watch triggered by
first heartbeat and unwatch coming in before the extra re-watch message. That
caused RemoteWatcher to still watch the subject even though it was intended to
be unwatched.
* I could reproduce it with sleeps at stratgic points
* Sovled by keeping track of re-watch followed by unwatch

NOTE: I dislike adding more state to RemoteWatcher, so if you see a better solution I'm all ears.