commit | da77fbd5258fad16496069b50c785521d3408767 | [log] [tgz] |
---|---|---|
author | Mike Burrows <m3b@google.com> | Mon Jun 06 10:57:52 2016 -0700 |
committer | Mike Burrows <m3b@google.com> | Mon Jun 06 22:12:30 2016 +0000 |
tree | 4634fa3793d898d7a5686d18d6f5a79a48f4d7b8 | |
parent | a5ddaae6ccb0f4afc9adfc792762eb5b0ff1b56a [diff] |
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
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.