commit | 570c2919f576c333490277aac3c1e46944d4fc89 | [log] [tgz] |
---|---|---|
author | Matt Rosencrantz <mattr@google.com> | Thu Oct 22 16:01:48 2015 -0700 |
committer | Matt Rosencrantz <mattr@google.com> | Thu Oct 22 16:01:48 2015 -0700 |
tree | a7f6aa8c2f9f4c2a3a5e4d41741b89e8e0bfd374 | |
parent | 37a243e2cb5431e4eabdea91218bc7596d63b311 [diff] |
runtime/internal/flow/conn: Fix flow control accounting when flows close.. Previously we were sometimes loosing shared tokens when a flow closed with borrowed tokens outstanding. This happened in two ways: 1. When the remote end closed a flow it didn't release the counts remaining in it's readq. 2. If the local end closes the flow with outstanding borrowed counts then an incoming release message will not find the flow in the map and so we'll just skip it's release and the borrowed counts will never be returned. This fix addresses those issues by not removing a flow from the flow map until all its borrowed counters have been released, and by assuming that a close flow message means the other end has erased its buffer. Change-Id: Ic6b433890c973a6d1e6637d535aca0f52582f392
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.