flynn/flynn — pull request #675 by titanous (2014-12-30 20:39:54+00:00)
Title: discoverd/client: Fix race in heartbeat

If we register again with new attributes, there is a chance that a heartbeat will occur *after* the explicit register, but *before* the old heartbeat with the old attributes is stopped.

This patch fixes the race by re-using the same heartbeat goroutine when re-registering and just swapping the attributes.