v.io: fix places where context.T cancellation functions are not called.

context.T (like its standard Go namesake) requires that the cancellation
function returned by WithCancel() be called, of the context object will be
leaked.  The same is true of WithTimeout() to a lesser degree---one might
ignore the issue if the timeout is short.

This change fixed a number of places where we curently fail to call the
cancellation function.

Some are only on error paths that will be taken only rarely.

Some are on timeout cases, which we could ignore, but for the moment, I'm
trying to be thorough, primarily because existing code acts as a template for
future code, and it seems better to encourage good habits.

In a couple of cases, the existing code is correct, but I added a comment to
explain that a call is not needed.

MultiPart: 2/2
Change-Id: Ia76a70dbc56d43d051862f406e5193871f29af4a
13 files changed
tree: 4634fa3793d898d7a5686d18d6f5a79a48f4d7b8
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTING.md
  11. CONTRIBUTORS
  12. envvar.go
  13. envvar_test.go
  14. LICENSE
  15. PATENTS
  16. README.md
  17. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.