45f8dd5d8c74d8c27ec3eb02cce5318b19e3d31d | Author: Johnny Bergström <github@joonix.se>
| 2015-10-30 10:20:23+01:00
Minor tweaks to round robin policy
Safer with defer unlock that remembering to do it at each return.
26b2f296c1b4a79cbc1e30e6887318ebe224ee2d | Author: Johnny Bergström <github@joonix.se>
| 2015-10-30 10:16:46+01:00
Select broadcast_address when doing automatic discovery
rpc_address might be set to "0.0.0.0" which is OK.
broadcast_address will be set to a proper IP.
According to documentation the broadcast_address is not allowed to be
0.0.0.0, but will be set to the same as rpc_address in other cases.
64eb2479f81d0adf1521cbf84318f5e78401b82f | Author: Johnny Bergström <github@joonix.se>
| 2015-10-30 10:10:55+01:00
Defer mutex unlocks to prevent accidental deadlocks in connection pool
One such case happened when panicing because of nil HostInfo
(which in turn was caused by bad discovery mechanism).
Without the defer, it would stay silent and get deadlocked.
bd3f975a85739f22f598e8520b2b2939b261ded9 | Author: Johnny Bergström <github@joonix.se>
| 2015-10-28 17:37:34+01:00
Set rpc_address for discovered hosts
According to documentation, the rpc_address is what should be used
for native transport. Not the peer address (listen address).