cloudfoundry/yagnats — pull request #12 by nota-ja (2014-11-17 12:08:00+00:00)
Title: Retry in ConnectionCluster.ProvideConnection()

Recently I've encuntered the problem related to rand.Seed described in https://github.com/cloudfoundry/yagnats/issues/8 . At first I looked out the cause and wrote code to solve it by myself, then I've found the GitHub issue. However the issue has a related pull request and is closed, the problem of not-seeding rand seems left alone.

So I've decided to send a pull request with my first solution. It makes ConnectionCluster.provideConnection() to retry connecting to another NATS server when it failed to connect one.

If you don't like it, I'll send another (simpler) pull request that fixes seeding only.

Thanks in advance.