Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Fix receiver flow control #103

Merged
merged 1 commit into from
Jun 17, 2018
Merged

Fix receiver flow control #103

merged 1 commit into from
Jun 17, 2018

Conversation

vcabbage
Copy link
Owner

Link should not send additional credits when there are queued
transfers/messages waiting to be read via Receiver.Receive. Message
decoding is moved into the link.mux goroutine so that the link can
know how many messages are queued by checking the link.messages
channel length. If the channel fills the link is effectively paused.
The receiver can indicate it can process additional message and unblock
the link my sending on link.receiverReady.

When additional credits are issued, link.linkCredit must be updated
before receiving any additional messages to ensure the sender and
receiver stay in sync.

Similarly, link.deliveryCount should not be arbitrarily changed based
on a flow frame received from the sender.

Link should not send additional credits when there are queued
transfers/messages waiting to be read via `Receiver.Receive`. Message
decoding is moved into the `link.mux` goroutine so that the link can
know how many messages are queued by checking the `link.messages`
channel length. If the channel fills the link is effectively paused.
The receiver can indicate it can process additional message and unblock
the link my sending on `link.receiverReady`.

When additional credits are issued, `link.linkCredit` must be updated
before receiving any additional messages to ensure the sender and
receiver stay in sync.

Similarly, `link.deliveryCount` should not be arbitrarily changed based
on a flow frame received from the sender.
@vcabbage vcabbage added the bug label Jun 17, 2018
@vcabbage vcabbage merged commit 0438881 into master Jun 17, 2018
@vcabbage vcabbage deleted the receiver-flow-control branch June 17, 2018 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant