veyron/runtimes/google/ipc/stream/vif: Fix race in accepting VCs.

This change fixes a race between the start of a goroutine to read messages
off the underlying network stream in a VIF and the StartAccept call.

By ensuring that VCs can be accepted before vif.readLoop begins, we avoid
races where clients establish a network connection and send an OpenVC request
before the server starts accepting such requests.

This should help reduce flakiness seen in the continuos build where
some tests fail with errors like:
VC handshake failed: remote end closed VC(VCs not accepted)

Change-Id: I6cdce6fe5d4378b06068cea808c376469814e637
3 files changed
tree: 3c52cdaa152aa436c24d2420046904b6138f168a
  1. examples/
  2. lib/
  3. runtimes/
  4. security/
  5. services/
  6. tools/