veyron/runtimes/google/ipc: Fix for https://github.com/veyron/release-issues/issues/413
The long backstory is this:
- A recent change made the ipc.Client implementation create flows to all
endpoints that a server resolves to in parallel
(https://veyron-review.googlesource.com/#/c/6536/)
- Another recent change made all servers export two endpoints: one for
the "TCP protocol" and another for the "WebSocket" protocol
(https://veyron-review.googlesource.com/#/c/6530/)
- A not-so-recent change causes "RPCs" to fetch discharges for
third-party caveats to be issued while creating flows
(https://veyron-review.googlesource.com/#/c/5715/)
The net result is that a client with third-party caveats ends up
sending two requests to the discharge service to fetch discharges -
one while establishing a flow to the TCP endpoint of the application
service and another while connecting to the websocket endpoint - both
of which happen in parallel.
This seems wasteful (simulatenously establishing a VC over the TCP and
Websocket protocols to the same IP:port pair) and fixing up that waste
is being discussed separately.
This also means that the test discharge service had a race, which this
commit addresses.
While at it, also cleaned up a few logging messages.
Change-Id: Ia702e582ebca6e8ea8011e1d2a270e11aac2f6bd
2 files changed